{"id":21307016,"url":"https://github.com/perlalien/alien-patch","last_synced_at":"2026-03-01T05:08:52.367Z","repository":{"id":21128800,"uuid":"24429697","full_name":"PerlAlien/Alien-patch","owner":"PerlAlien","description":"Find or build patch","archived":false,"fork":false,"pushed_at":"2024-12-22T23:56:02.000Z","size":58,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T09:11:54.640Z","etag":null,"topics":["alien","patch","perl"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerlAlien.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-24T19:38:19.000Z","updated_at":"2024-12-22T23:56:04.000Z","dependencies_parsed_at":"2022-09-08T07:42:15.927Z","dependency_job_id":null,"html_url":"https://github.com/PerlAlien/Alien-patch","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-patch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-patch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-patch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-patch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerlAlien","download_url":"https://codeload.github.com/PerlAlien/Alien-patch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243784103,"owners_count":20347409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alien","patch","perl"],"created_at":"2024-11-21T16:29:25.624Z","updated_at":"2026-03-01T05:08:52.321Z","avatar_url":"https://github.com/PerlAlien.png","language":"Perl","readme":"# Alien::patch ![linux](https://github.com/PerlAlien/Alien-patch/workflows/linux/badge.svg) ![macos-system](https://github.com/PerlAlien/Alien-patch/workflows/macos-system/badge.svg) ![macos-share](https://github.com/PerlAlien/Alien-patch/workflows/macos-share/badge.svg) ![windows-system](https://github.com/PerlAlien/Alien-patch/workflows/windows-system/badge.svg)\n\nFind or build patch\n\n# SYNOPSIS\n\n```perl\nuse Alien::patch ();\nuse Env qw( @PATH );\n\nunshift @PATH, Alien::patch-\u003ebin_dir;\nmy $patch = Alien::patch-\u003eexe;\nsystem \"$patch -p1 \u003c foo.patch\";\n```\n\nOr in your [alienfile](https://metacpan.org/pod/alienfile):\n\n```perl\nuse alienfile;\n...\nshare {\n   ...\n   # Alien-Build knows to automatically pull in Alien::patch\n   # so you do not need to specify it as a prereq.\n   # The %{.install.patch} directory is a shortcut for the\n   # `patch' directory in your dist, and gets copied into the\n   # dist share directory, so you can rebuild with `af' after\n   # install.\n   patch [ '%{patch} -p1 \u003c %{.install.patch}/mypatch.patch' ];\n};\n```\n\nOr with [Alien::Build::ModuleBuild](https://metacpan.org/pod/Alien::Build::ModuleBuild):\n\n```perl\nuse Alien::Base::ModuleBuild;\nAlien::Base::ModuleBuild-\u003enew(\n  ...\n  alien_bin_requires =\u003e {\n    'Alien::patch' =\u003e '0.08',\n  },\n  alien_build_commands =\u003e {\n    '%{patch} -p1 \u003c foo.patch',\n  },\n  ...\n)-\u003ecreate_build_script;\n```\n\n# DESCRIPTION\n\nMany environments provide the patch command, but a few do not.\nUsing this module in your [alienfile](https://metacpan.org/pod/alienfile) (or elsewhere) you can\nmake sure that patch will be available.  If the system provides\nit, then great, this module is a no-op.  If it does not, then\nit will download and install it into a private location so that\nit can be added to the `PATH` when this module is used.\n\nThis class is a subclass of [Alien::Base](https://metacpan.org/pod/Alien::Base), and works closely\nwith [Alien::Build](https://metacpan.org/pod/Alien::Build) and [alienfile](https://metacpan.org/pod/alienfile)\n\n# METHODS\n\n## exe\n\n```perl\nmy $exe = Alien::patch-\u003eexe;\n```\n\nReturns the command to run patch on your system.  For now it simply\nadds the `--binary` option on Windows (`MSWin32` but not `cygwin`)\nwhich is usually what you want.\n\n# HELPERS\n\n## patch\n\n```\n%{patch}\n```\n\nWhen used with [Alien::Base::ModuleBuild](https://metacpan.org/pod/Alien::Base::ModuleBuild) in a `alien_build_commands` or `alien_install_commands`,\nthis helper will be replaced by either `patch` (Unix and cygwin) or `patch --binary` (MSWin32).\n\n# SEE ALSO\n\n- [Alien](https://metacpan.org/pod/Alien)\n- [Alien::Build](https://metacpan.org/pod/Alien::Build)\n- [alienfile](https://metacpan.org/pod/alienfile)\n\n1;\n\n# AUTHOR\n\nAuthor: Graham Ollis \u003cplicease@cpan.org\u003e\n\nContributors:\n\nZakariyya Mughal\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2017 by Graham Ollis.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperlalien%2Falien-patch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperlalien%2Falien-patch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperlalien%2Falien-patch/lists"}