tkurbad-overlay/dev-php/illuminate-collections/illuminate-collections-12.33.0.ebuild

64 lines
1.5 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="The Illuminate Collections package."
HOMEPAGE="https://github.com/illuminate/collections"
SRC_URI="https://github.com/illuminate/collections/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/collections-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
BDEPEND="dev-php/theseer-Autoload"
RDEPEND="
>=dev-lang/php-7.4:*
dev-php/fedora-autoloader
dev-php/illuminate-conditionable
dev-php/illuminate-contracts
dev-php/illuminate-macroable
dev-php/symfony-polyfill-php84
dev-php/symfony-polyfill-php85
"
src_prepare() {
default
phpab \
--quiet \
--output autoload.php \
--template fedora2 \
--basedir . \
. \
|| die
VENDOR_DIR="${EPREFIX}/usr/share/php"
cat >> autoload.php <<EOF || die "failed to extend autoload.php"
// Dependencies
\Fedora\Autoloader\Dependencies::required([
"${VENDOR_DIR}/Fedora/Autoloader/autoload.php",
"${VENDOR_DIR}/Illuminate/Support/autoload.php",
"${VENDOR_DIR}/Illuminate/Contracts/autoload.php",
"${VENDOR_DIR}/Illuminate/Support/autoload.php",
"${VENDOR_DIR}/Psr/Container/autoload.php",
"${VENDOR_DIR}/Psr/SimpleCache/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Php84/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Php85/autoload.php"
]);
EOF
echo "require_once __DIR__ . \"/functions.php\";" >> autoload.php
echo "require_once __DIR__ . \"/helpers.php\";" >> autoload.php
}
src_install() {
insinto "/usr/share/php/Illuminate/Support"
doins -r *.php Traits
}