dev-php/composer - 9999 (nest)

Search

Install

Install this version:

emerge -a =dev-php/composer-9999

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-php/composer-9999

Or alternatively:

emerge --autounmask-write -a =dev-php/composer-9999

Package Information

Description:
Dependency Manager for PHP
Homepage:
https://github.com/composer/composer
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
9999 8 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

COMPOSER_INSTALL_AUTOLOAD="src/Composer"
PHP_REQ_USE="curl?,intl?,ssl,zlib,zip?"

inherit composer edo git-r3 optfeature shell-completion

DESCRIPTION="Dependency Manager for PHP"
HOMEPAGE="https://github.com/composer/composer"
EGIT_REPO_URI="https://github.com/composer/${PN}.git"
SRC_URI="https://github.com/SpiderX/portage-overlay/releases/download/${PN}-2.10.3-1/${PN}-2.10.3-patches-1.tar.xz"

LICENSE="MIT"
SLOT="0"
IUSE="curl intl ipv6 zip"
REQUIRED_USE="test? ( curl intl zip )"

RDEPEND="dev-php/composer-ca-bundle
	dev-php/composer-class-map-generator
	dev-php/composer-pcre
	dev-php/composer-semver
	dev-php/composer-spdx-licenses
	dev-php/jsonlint
	dev-php/justinrainbow-json-schema
	dev-php/metadata-minifier
	dev-php/phar-utils
	dev-php/psr-log
	dev-php/reactphp-promise
	dev-php/seld-signal-handler
	dev-php/symfony-console
	>=dev-php/symfony-filesystem-7
	>=dev-php/symfony-finder-7
	dev-php/symfony-polyfill-php80
	dev-php/symfony-polyfill-php81
	dev-php/symfony-polyfill-php84
	>=dev-php/symfony-process-7
	dev-php/xdebug-handler"
BDEPEND="dev-php/theseer-Autoload
	test? ( dev-php/sebastian-object-reflector )"

PATCHES=( "${WORKDIR}/${PN}"-2.10.3-patches/src
	"${WORKDIR}/${PN}"-2.10.3-patches/tests )

composer_enable_tests phpunit

src_unpack() {
	git-r3_src_unpack
	unpack ${A}
}

src_prepare() {
	composer_src_prepare

	# bin/composer is patched to load the distro autoloader from this
	# source-tree representation of /usr/share/php/Composer.
	edo mkdir -p share/php
	edo ln -s -t share/php/ ../../src/Composer
}

src_compile() {
	# generate installed.json
	edo php "${FILESDIR}"/_installed.php

	local completion
	for completion in bash fish zsh ; do
		edo ./bin/composer completion "${completion}" > composer."${completion}"
	done
}

src_test() {
	use ipv6 || COMPOSER_TEST_PATCHES+=( "${WORKDIR}/${PN}"-2.10.3-patches/composer-2.10.3-tests-no-ipv6.patch )
	composer_test_patch
	# recreate the minimal installed Composer tree expected by the test suite.
	# tests reference /usr/share/composer/{res,LICENSE}
	edo mkdir composer vendor
	edo ln -s -t composer ../res
	edo ln -s -t composer ../LICENSE
	# generate classmap load with exclution as in composer.json
	edo phpab -q -o vendor/autoload.php -t "${FILESDIR}"/autoload.php.tpl \
		-e "tests/Composer/Test/Fixtures/*" \
		-e "tests/Composer/Test/Autoload/Fixtures/*"  \
		-e "tests/Composer/Test/Autoload/MinimumVersionSupport/*" \
		-e "tests/Composer/Test/Plugin/Fixtures/*" tests/Composer/Test
	edo git init -q
	edo git config user.email "you@example.com"
	edo git config user.name "Your Name"
	edo git add .
	edo git commit -m "init"
	edo php -d memory_limit=512M /usr/bin/phpunit --testdox
}

src_install() {
	einstalldocs
	insinto /usr/share/composer
	doins -r res LICENSE installed.json
	insinto /usr/share/php
	doins -r src/Composer
	dobin bin/composer
	newbashcomp composer.bash composer
	newfishcomp composer.fish composer
	newzshcomp composer.zsh _composer
}

pkg_postinst() {
	optfeature "Support to unzip archives" dev-lang/php[zip]
}

USE Flags

Manage flags for this package: euse -i <flag> -p dev-php/composer | euse -E <flag> -p dev-php/composer | euse -D <flag> -p dev-php/composer

Global/Standard Flags

zip

Inherited Eclasses

edo

Dependencies

RDEPEND

dev-php/composer-ca-bundle
	dev-php/composer-class-map-generator
	dev-php/composer-pcre
	dev-php/composer-semver
	dev-php/composer-spdx-licenses
	dev-php/jsonlint
	dev-php/justinrainbow-json-schema
	dev-php/metadata-minifier
	dev-php/phar-utils
	dev-php/psr-log
	dev-php/reactphp-promise
	dev-php/seld-signal-handler
	dev-php/symfony-console
	>=dev-php/symfony-filesystem-7
	>=dev-php/symfony-finder-7
	dev-php/symfony-polyfill-php80
	dev-php/symfony-polyfill-php81
	dev-php/symfony-polyfill-php84
	>=dev-php/symfony-process-7
	dev-php/xdebug-handler

BDEPEND

dev-php/theseer-Autoload
	test? ( dev-php/sebastian-object-reflector )

Manifest for 9999

Type File Size Source URLs
DIST composer-2.10.3-patches-1.tar.xz 38804 bytes https://github.com/SpiderX/portage-overlay/releases/download/composer-2.10.3-1/composer-2.10.3-patches-1.tar.xz