tkurbad-overlay/dev-php/php-pm-httpkernel-adapter/php-pm-httpkernel-adapter-2.3.1.ebuild

88 lines
2.9 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="PHP-PM adapter for Symfony HTTPKernel."
HOMEPAGE="https://github.com/php-pm/php-pm-httpkernel"
SRC_URI="https://github.com/php-pm/php-pm-httpkernel/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/php-pm-httpkernel-${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/guzzlehttp-psr7
dev-php/php-pm
dev-php/symfony-http-foundation
dev-php/symfony-http-kernel
"
src_prepare() {
default
phpab \
--quiet \
--output autoload.php \
--template fedora2 \
--basedir src \
src \
|| 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}/Evenement/autoload.php",
"${VENDOR_DIR}/Fig/Http/Message/autoload.php",
"${VENDOR_DIR}/GuzzleHttp/Psr7/autoload.php",
"${VENDOR_DIR}/PHPPM/autoload.php",
"${VENDOR_DIR}/Psr/Container/autoload.php",
"${VENDOR_DIR}/Psr/EventDispatcher/autoload.php",
"${VENDOR_DIR}/Psr/Http/Message/autoload.php",
"${VENDOR_DIR}/Psr/Http/Message/autoload.php",
"${VENDOR_DIR}/Psr/Http/Server/autoload.php",
"${VENDOR_DIR}/Psr/Log/autoload.php",
"${VENDOR_DIR}/Ralouphie-getallheaders/autoload.php",
"${VENDOR_DIR}/React/Cache/autoload.php",
"${VENDOR_DIR}/React/ChildProcess/autoload.php",
"${VENDOR_DIR}/React/Dns/autoload.php",
"${VENDOR_DIR}/React/EventLoop/autoload.php",
"${VENDOR_DIR}/React/Http/autoload.php",
"${VENDOR_DIR}/React/Promise/autoload.php",
"${VENDOR_DIR}/React/Socket/autoload.php",
"${VENDOR_DIR}/React/Stream/autoload.php",
"${VENDOR_DIR}/RingCentral/Psr7/autoload.php",
"${VENDOR_DIR}/Symfony/Component/Console/autoload.php",
"${VENDOR_DIR}/Symfony/Component/DeprecationContracts/autoload.php",
"${VENDOR_DIR}/Symfony/Component/ErrorHandler/autoload.php",
"${VENDOR_DIR}/Symfony/Component/EventDispatcher/autoload.php",
"${VENDOR_DIR}/Symfony/Contracts/EventDispatcher/autoload.php",
"${VENDOR_DIR}/Symfony/Component/HttpFoundation/autoload.php",
"${VENDOR_DIR}/Symfony/Component/HttpKernel/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Ctype/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Intl/Grapheme/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Intl/Normalizer/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Mbstring/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Php83/autoload.php",
"${VENDOR_DIR}/Symfony/Component/Process/autoload.php",
"${VENDOR_DIR}/Symfony/Contracts/Service/autoload.php",
"${VENDOR_DIR}/Symfony/Component/String/autoload.php",
"${VENDOR_DIR}/Symfony/Component/VarDumper/autoload.php"
]);
EOF
}
src_install() {
insinto "/usr/share/php/PHPPM"
doins -r *.php LICENSE src/*
}