{"id":21306988,"url":"https://github.com/perlalien/alien-base-modulebuild","last_synced_at":"2025-07-22T20:04:22.201Z","repository":{"id":39583223,"uuid":"85816478","full_name":"PerlAlien/Alien-Base-ModuleBuild","owner":"PerlAlien","description":"A Module::Build subclass for building Alien::     modules and their libraries","archived":false,"fork":false,"pushed_at":"2024-12-23T12:37:16.000Z","size":1398,"stargazers_count":3,"open_issues_count":4,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-11T21:36:16.974Z","etag":null,"topics":["alien","cpan","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-22T10:48:01.000Z","updated_at":"2025-07-06T02:42:06.000Z","dependencies_parsed_at":"2025-06-03T23:08:47.235Z","dependency_job_id":null,"html_url":"https://github.com/PerlAlien/Alien-Base-ModuleBuild","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/PerlAlien/Alien-Base-ModuleBuild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Base-ModuleBuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Base-ModuleBuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Base-ModuleBuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Base-ModuleBuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerlAlien","download_url":"https://codeload.github.com/PerlAlien/Alien-Base-ModuleBuild/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Base-ModuleBuild/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cpan","perl"],"created_at":"2024-11-21T16:29:12.563Z","updated_at":"2025-07-22T20:04:22.178Z","avatar_url":"https://github.com/PerlAlien.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alien::Base::ModuleBuild ![linux](https://github.com/PerlAlien/Alien-Base-ModuleBuild/workflows/linux/badge.svg) ![windows](https://github.com/PerlAlien/Alien-Base-ModuleBuild/workflows/windows/badge.svg) ![macos](https://github.com/PerlAlien/Alien-Base-ModuleBuild/workflows/macos/badge.svg)\n\nA Module::Build subclass for building Alien:: modules and their libraries\n\n# SYNOPSIS\n\nIn your Build.PL:\n\n```perl\nuse Alien::Base::ModuleBuild;\n\nmy $builder = Alien::Base::ModuleBuild-\u003enew(\n  module_name =\u003e 'Alien::MyLibrary',\n\n  configure_requires =\u003e {\n    'Alien::Base::ModuleBuild' =\u003e '0.005',\n    'Module::Build' =\u003e '0.28'\n  },\n  requires =\u003e {\n    'Alien::Base' =\u003e '0.005',\n  },\n\n  alien_name =\u003e 'mylibrary', # the pkg-config name if you want\n                             # to use pkg-config to discover\n                             # system version of the mylibrary\n\n  alien_repository =\u003e {\n    protocol =\u003e 'https',\n    host     =\u003e 'myhost.org',\n    location =\u003e '/path/to/tarballs',\n    pattern  =\u003e qr{^mylibrary-([0-9\\.]+)\\.tar\\.gz$},\n  },\n\n  # this is the default:\n  alien_build_commands =\u003e [\n    \"%c --prefix=%s\", # %c is a platform independent version of ./configure\n    \"make\",\n  ],\n\n  # this is the default for install:\n  alien_install_commands =\u003e [\n    \"make install\",\n  ],\n\n  alien_isolate_dynamic =\u003e 1,\n);\n```\n\n# DESCRIPTION\n\n**NOTE**: Please consider for new development of [Alien](https://metacpan.org/pod/Alien)s that you use\n[Alien::Build](https://metacpan.org/pod/Alien::Build) and [alienfile](https://metacpan.org/pod/alienfile) instead.  Like this module they work\nwith [Alien::Base](https://metacpan.org/pod/Alien::Base).  Unlike this module they are more easily customized\nand handle a number of corner cases better.  For a good place to start,\nplease see [Alien::Build::Manual::AlienAuthor](https://metacpan.org/pod/Alien::Build::Manual::AlienAuthor).  Although the\nAlien-Base / Alien-Build team will continue to maintain this module,\n(we will continue to fix bugs where appropriate), we aren't adding any\nnew features to this module.\n\nThis is a subclass of [Module::Build](https://metacpan.org/pod/Module::Build), that with [Alien::Base](https://metacpan.org/pod/Alien::Base) allows\nfor easy creation of Alien distributions.  This module is used during the\nbuild step of your distribution.  When properly configured it will\n\n- use pkg-config to find and use the system version of the library\n- download, build and install the library if the system does not provide it\n\n# METHODS\n\n## alien\\_check\\_installed\\_version\n\n\\[version 0.001\\]\n\n```perl\nmy $version = $abmb-\u003ealien_check_installed_version;\n```\n\nThis function determines if the library is already installed as part of\nthe operating system, and returns the version as a string.  If it can't\nbe detected then it should return empty list.\n\nThe default implementation relies on `pkg-config`, but you will probably\nwant to override this with your own implementation if the package you are\nbuilding does not use `pkg-config`.\n\n## alien\\_check\\_built\\_version\n\n\\[version 0.006\\]\n\n```perl\nmy $version = $amb-\u003ealien_check_built_version;\n```\n\nThis function determines the version of the library after it has been\nbuilt from source.  This function only gets called if the operating\nsystem version can not be found and the package is successfully built.\nThe version is returned on success.  If the version can't be detected\nthen it should return empty list.  Note that failing to detect a version\nis considered a failure and the corresponding `./Build` action will\nfail!\n\nAny string is valid as a version as far as [Alien::Base](https://metacpan.org/pod/Alien::Base) is concerned.\nThe most useful value would be a number or dotted decimal that most\nsoftware developers recognize and that software tools can differentiate.\nIn some cases packages will not have a clear version number, in which\ncase the string `unknown` would be a reasonable choice.\n\nThe default implementation relies on `pkg-config`, and other heuristics,\nbut you will probably want to override this with your own implementation\nif the package you are building does not use `pkg-config`.\n\nWhen this method is called, the current working directory will be the\nbuild root.\n\nIf you see an error message like this:\n\n```\nLibrary looks like it installed, but no version was determined\n```\n\nAfter the package is built from source code then you probably need to\nprovide an implementation for this method.\n\n## alien\\_extract\\_archive\n\n\\[version 0.024\\]\n\n```perl\nmy $dir = $amb-\u003ealien_extract_archive($filename);\n```\n\nThis function unpacks the given archive and returns the directory\ncontaining the unpacked files.\n\nThe default implementation relies on [Archive::Extract](https://metacpan.org/pod/Archive::Extract) that is able\nto handle most common formats. In order to handle other formats or\narchives requiring some special treatment you may want to override\nthis method.\n\n## alien\\_do\\_system\n\n\\[version 0.024\\]\n\n```perl\nmy %result = $amb-\u003ealien_do_system($cmd)\n```\n\nSimilar to\n[Module::Build's do\\_system](https://metacpan.org/pod/Module::Build::API#do_system-cmd-args),\nalso sets the path and several environment variables in accordance\nto the object configuration (i.e. `alien_bin_requires`) and\nperforms the interpolation of the patterns described in\n[\"COMMAND INTERPOLATION\" in Alien::Base::ModuleBuild::API](https://metacpan.org/pod/Alien::Base::ModuleBuild::API#COMMAND-INTERPOLATION).\n\nReturns a set of key value pairs including `stdout`, `stderr`,\n`success` and `command`.\n\n## alien\\_do\\_commands\n\n```\n$amb-\u003ealien_do_commands($phase);\n```\n\nExecutes the commands for the given phase.\n\n## alien\\_interpolate\n\n```perl\nmy $string = $amb-\u003ealien_interpolate($string);\n```\n\nTakes the input string and interpolates the results.\n\n## alien\\_install\\_network\n\n\\[version 1.16\\]\n\n```perl\nmy $bool = $amb-\u003ealien_install_network;\n```\n\nReturns true if downloading source from the internet is allowed.  This\nis true unless `ALIEN_INSTALL_NETWORK` is defined and false.\n\n## alien\\_download\\_rule\n\n\\[version 1.16\\]\n\n```perl\nmy $rule = $amb-\u003ealien_download_rule;\n```\n\nThis will return one of `warn`, `digest`, `encrypt`, `digest_or_encrypt`\nor `digest_and_encrypt`.  This is based on the `ALIEN_DOWNLOAD_RULE`\nenvironment variable.\n\n# GUIDE TO DOCUMENTATION\n\nThe documentation for `Module::Build` is broken up into sections:\n\n- General Usage ([Module::Build](https://metacpan.org/pod/Module::Build))\n\n    This is the landing document for [Alien::Base::ModuleBuild](https://metacpan.org/pod/Alien::Base::ModuleBuild)'s parent class.\n    It describes basic usage and background information.\n    Its main purpose is to assist the user who wants to learn how to invoke\n    and control `Module::Build` scripts at the command line.\n\n    It also lists the extra documentation for its use. Users and authors of Alien::\n    modules should familiarize themselves with these documents. [Module::Build::API](https://metacpan.org/pod/Module::Build::API)\n    is of particular importance to authors.\n\n- Alien-Specific Usage ([Alien::Base::ModuleBuild](https://metacpan.org/pod/Alien::Base::ModuleBuild))\n\n    This is the document you are currently reading.\n\n- Authoring Reference ([Alien::Base::Authoring](https://metacpan.org/pod/Alien::Base::Authoring))\n\n    This document describes the structure and organization of\n    `Alien::Base` based projects, beyond that contained in\n    `Module::Build::Authoring`, and the relevant concepts needed by authors who are\n    writing `Build.PL` scripts for a distribution or controlling\n    `Alien::Base::ModuleBuild` processes programmatically.\n\n    Note that as it contains information both for the build and use phases of\n    [Alien::Base](https://metacpan.org/pod/Alien::Base) projects, it is located in the upper namespace.\n\n- API Reference ([Alien::Base::ModuleBuild::API](https://metacpan.org/pod/Alien::Base::ModuleBuild::API))\n\n    This is a reference to the `Alien::Base::ModuleBuild` API beyond that contained\n    in `Module::Build::API`.\n\n- Using the resulting [Alien](https://metacpan.org/pod/Alien) ([Alien::Build::Manual::AlienUser](https://metacpan.org/pod/Alien::Build::Manual::AlienUser))\n\n    Once you have an [Alien](https://metacpan.org/pod/Alien) you or your users can review this manual for how to use\n    it.  Generally speaking you should have some useful usage information in your\n    [Alien](https://metacpan.org/pod/Alien)'s POD, but some authors choose to direct their users to this manual\n    instead.\n\n- Using [Alien::Build](https://metacpan.org/pod/Alien::Build) instead ([Alien::Build::Manual](https://metacpan.org/pod/Alien::Build::Manual))\n\n    As mentioned at the top, you are encouraged to use the [Alien::Build](https://metacpan.org/pod/Alien::Build) and\n    [alienfile](https://metacpan.org/pod/alienfile) system instead.  This manual is a starting point for the other\n    [Alien::Build](https://metacpan.org/pod/Alien::Build) documentation.\n\n# ENVIRONMENT\n\n- **ALIEN\\_ARCH**\n\n    Set to a true value to install to an arch-specific directory.\n\n- **ALIEN\\_DOWNLOAD\\_RULE**\n\n    This controls security options for fetching alienized packages over the internet.\n    The legal values are:\n\n    - `warn`\n\n        Warn if the package is either unencrypted or lacks a digest.  This is currently\n        the default, but will change in the near future.\n\n    - `digest`\n\n        Fetch will not happen unless there is a digest for the alienized package.\n\n    - `encrypt`\n\n        Fetch will not happen unless via an encrypted protocol like `https`, or if the\n        package is bundled with the [Alien](https://metacpan.org/pod/Alien).\n\n    - `digest_or_encrypt`\n\n        Fetch will only happen if the alienized package has a cryptographic signature digest,\n        or if an encrypted protocol like `https` is used, or if the package is bundled with\n        the [Alien](https://metacpan.org/pod/Alien).  This will be the default in the near future.\n\n    - `digest_and_encrypt`\n\n        Fetch will only happen if the alienized package has a cryptographic signature digest,\n        and is fetched via a secure protocol (like `https`).  Bundled packages are also\n        considered fetch via a secure protocol, but will still require a digest.\n\n- **ALIEN\\_FORCE**\n\n    Skips checking for an installed version and forces reinstalling the Alien target.\n\n- **ALIEN\\_INSTALL\\_NETWORK**\n\n    If true (the default if not defined), then network installs will be allowed.\n    Set to `0` or another false value to turn off network installs.\n\n- **ALIEN\\_INSTALL\\_TYPE**\n\n    Set to `share` or `system` to override the install type.  Set to `default` or unset\n    to restore the default.\n\n- **ALIEN\\_VERBOSE**\n\n    Enables verbose output from [M::B::do\\_system](https://metacpan.org/pod/Module::Build#do_system).\n\n- **ALIEN\\_${MODULENAME}\\_REPO\\_${PROTOCOL}\\_${KEY}**\n\n    Overrides $KEY in the given module's repository configuration matching $PROTOCOL.\n    For example, `ALIEN_OPENSSL_REPO_FTP_HOST=ftp.example.com`.\n\n# SEE ALSO\n\n- [Alien::Build](https://metacpan.org/pod/Alien::Build)\n- [alienfile](https://metacpan.org/pod/alienfile)\n- [Alien::Build::Manual::AlienAuthor](https://metacpan.org/pod/Alien::Build::Manual::AlienAuthor)\n- [Alien](https://metacpan.org/pod/Alien)\n\n# THANKS\n\nThanks also to\n\n- Christian Walde (Mithaldu)\n\n    For productive conversations about component interoperability.\n\n- kmx\n\n    For writing Alien::Tidyp from which I drew many of my initial ideas.\n\n- David Mertens (run4flat)\n\n    For productive conversations about implementation.\n\n- Mark Nunberg (mordy, mnunberg)\n\n    For graciously teaching me about rpath and dynamic loading,\n\n# AUTHOR\n\nOriginal author: Joel A Berger \u003cjoel.a.berger@gmail.com\u003e\n\nCurrent maintainer: Graham Ollis \u003cplicease@cpan.org\u003e\n\nContributors:\n\nDavid Mertens (run4flat)\n\nMark Nunberg (mordy, mnunberg)\n\nChristian Walde (Mithaldu)\n\nBrian Wightman (MidLifeXis)\n\nGraham Ollis (plicease)\n\nZaki Mughal (zmughal)\n\nmohawk2\n\nVikas N Kumar (vikasnkumar)\n\nFlavio Poletti (polettix)\n\nSalvador Fandiño (salva)\n\nGianni Ceccarelli (dakkar)\n\nPavel Shaydo (zwon, trinitum)\n\nKang-min Liu (劉康民, gugod)\n\nNicholas Shipp (nshp)\n\nPetr Písař (ppisar)\n\nAlberto Simões (ambs)\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2012-2022 by Joel A Berger.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperlalien%2Falien-base-modulebuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperlalien%2Falien-base-modulebuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperlalien%2Falien-base-modulebuild/lists"}