summaryrefslogtreecommitdiff
path: root/dev-php/swoole/swoole-6.2.1.ebuild
blob: afc992ec211bcf35527e6ccf2a0e5cb3b807d919 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 2021-2026 BaldEagleOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8

PHP_EXT_NAME="swoole"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"
PHP_EXT_S="${WORKDIR}/${PN}-src-${PV}"
PHP_EXT_SAPIS="cli"
PHP_EXT_NEEDED_USE="cli,sockets?"
# Supported PHP versions see https://github.com/swoole/swoole-src/blob/master/docs/SUPPORTED.md
USE_PHP="php8-2 php8-3 php8-4"

inherit php-ext-source-r3

HOMEPAGE="https://www.swoole.co.uk"
SRC_URI="https://github.com/swoole/swoole-src/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"

DOCS=( README.md )

DESCRIPTION="Event-driven asynchronous & concurrent & coroutine networking engine"
LICENSE="Apache-2.0"
SLOT="0"

DEPEND="
	app-arch/brotli:0=
	dev-libs/libpcre
	sys-libs/zlib:0=
	ssl? (
		!libressl? ( dev-libs/openssl:0= )
		libressl? ( dev-libs/libressl:0= )
	)
	mysql? (
		php_targets_php8-2? ( dev-lang/php:8.2[mysql,mysqli(+)] )
		php_targets_php8-3? ( dev-lang/php:8.3[mysql,mysqli(+)] )
		php_targets_php8-4? ( dev-lang/php:8.4[mysql,mysqli(+)] )
	)
"

RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}-src-${PV}"
IUSE="debug http2 libressl mysql sockets ssl"

src_prepare() {
	php-ext-source-r3_src_prepare
}

src_configure() {
	local PHP_EXT_ECONF_ARGS=(
		--enable-swoole
		$(use_enable debug)
		$(use_enable http2)
		$(use_enable mysql mysqlnd)
		$(use_enable ssl openssl)
		$(use_with ssl openssl-dir "${EROOT}/usr")
		$(use_enable sockets)
	)
	php-ext-source-r3_src_configure
}

src_install() {
	php-ext-source-r3_src_compile
}

src_install() {
	php-ext-source-r3_src_install
}

src_test() {
	php-ext-source-r3_src_test
}