3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit multilib-minimal verify-sig
|
|
6 |
CMAKE_REMOVE_MODULES_LIST=( FindMbedTLS )
|
|
7 |
|
|
8 |
inherit cmake-multilib git-r3
|
7 |
9 |
|
8 |
|
MY_P="${P}-alpha-dev"
|
9 |
10 |
DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
|
10 |
11 |
HOMEPAGE="
|
11 |
12 |
https://libevent.org/
|
12 |
13 |
https://github.com/libevent/libevent/
|
13 |
14 |
"
|
14 |
|
BASE_URI="https://github.com/libevent/libevent/releases/download/release-${PV}-alpha"
|
15 |
|
SRC_URI="
|
16 |
|
${BASE_URI}/${MY_P}.tar.gz
|
17 |
|
verify-sig? (
|
18 |
|
${BASE_URI}/${MY_P}.tar.gz.asc
|
19 |
|
)
|
20 |
|
"
|
21 |
|
S=${WORKDIR}/${MY_P}
|
|
15 |
EGIT_REPO_URI="https://github.com/libevent/libevent.git"
|
22 |
16 |
|
23 |
17 |
LICENSE="BSD"
|
24 |
18 |
SLOT="0/2.2.1-r2"
|
... | ... | |
31 |
25 |
RESTRICT="test"
|
32 |
26 |
|
33 |
27 |
DEPEND="
|
34 |
|
mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] )
|
|
28 |
mbedtls? ( net-libs/mbedtls:3=[${MULTILIB_USEDEP}] )
|
35 |
29 |
ssl? ( >=dev-libs/openssl-1.0.1h-r2:=[${MULTILIB_USEDEP}] )
|
36 |
30 |
"
|
37 |
31 |
RDEPEND="
|
38 |
32 |
${DEPEND}
|
39 |
33 |
"
|
40 |
|
BDEPEND="
|
41 |
|
verify-sig? (
|
42 |
|
sec-keys/openpgp-keys-libevent
|
43 |
|
)
|
44 |
|
"
|
45 |
34 |
|
46 |
|
DOCS=( README.md ChangeLog{,-1.4,-2.0} whatsnew-2.{0,1}.txt )
|
|
35 |
DOCS=( README.md ChangeLog{,-2.0,-2.1} whatsnew-2.{0,1}.txt )
|
47 |
36 |
MULTILIB_WRAPPED_HEADERS=(
|
48 |
37 |
/usr/include/event2/event-config.h
|
49 |
38 |
)
|
50 |
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libevent.asc
|
51 |
|
|
52 |
|
PATCHES=(
|
53 |
|
# signalfd-by-default breaks at least app-misc/tmux
|
54 |
|
# https://github.com/libevent/libevent/pull/1486
|
55 |
|
"${FILESDIR}/${P}-disable-signalfd.patch"
|
56 |
|
)
|
57 |
39 |
|
58 |
40 |
multilib_src_configure() {
|
59 |
|
# fix out-of-source builds
|
60 |
|
mkdir -p test || die
|
61 |
|
|
62 |
|
local ECONF_SOURCE="${S}"
|
63 |
|
local myconf=(
|
64 |
|
$(use_enable clock-gettime)
|
65 |
|
$(use_enable debug debug-mode)
|
66 |
|
$(use_enable malloc-replacement malloc-replacement)
|
67 |
|
$(use_enable mbedtls)
|
68 |
|
$(use_enable ssl openssl)
|
69 |
|
$(use_enable static-libs static)
|
70 |
|
$(use_enable test libevent-regress)
|
71 |
|
$(use_enable verbose-debug)
|
72 |
|
--disable-samples
|
|
41 |
local mycmakeargs=(
|
|
42 |
-DEVENT__DISABLE_CLOCK_GETTIME=$(usex !clock-gettime)
|
|
43 |
-DEVENT__DISABLE_DEBUG_MODE=$(usex !debug)
|
|
44 |
-DEVENT__DISABLE_MBEDTLS=$(usex !mbedtls)
|
|
45 |
-DEVENT__DISABLE_MM_REPLACEMENT=$(usex !malloc-replacement)
|
|
46 |
-DEVENT__DISABLE_OPENSSL=$(usex !ssl)
|
|
47 |
-DEVENT__LIBRARY_TYPE=$(usex static-libs BOTH SHARED)
|
|
48 |
-DCMAKE_DEBUG_POSTFIX=""
|
73 |
49 |
)
|
74 |
|
econf "${myconf[@]}"
|
75 |
|
|
76 |
|
# workaround https://github.com/libevent/libevent/issues/1459
|
77 |
|
sed -i -e 's:@CMAKE_DEBUG_POSTFIX@::' *.pc || die
|
78 |
|
}
|
79 |
|
|
80 |
|
multilib_src_install_all() {
|
81 |
|
einstalldocs
|
82 |
|
find "${ED}" -name '*.la' -delete || die
|
|
50 |
cmake_src_configure
|
83 |
51 |
}
|