blob: 41c1916c349b7050bcb97219114ee7a3b2c9273b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit php-pear-r2
DESCRIPTION="Provides an easy way to perform HTTP requests"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="+curl +fileinfo +ssl test +zlib"
# We don't have Yoast\PHPUnitPolyfills in Gentoo
# and we would need to patch sources to find it
RESTRICT="test"
RDEPEND="dev-lang/php:*[curl?,fileinfo?,ssl?,zlib?]
>=dev-php/PEAR-Net_URL2-2.2.0"
DEPEND="test? ( ${RDEPEND} dev-php/phpunit )"
src_prepare() {
sed -i "s~@data_dir@~${EPREFIX}/usr/share/php/data~" HTTP/Request2/CookieJar.php || die
default
}
src_test() {
phpunit tests || die
}
src_install() {
php-pear-r2_src_install
insinto "/usr/share/php/data/${PHP_PEAR_PKG_NAME}"
doins data/*
}
|