mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-06 04:51:18 +02:00
dev-libs/libevent: Sync with Gentoo
It's from Gentoo commit 01960962208fd6ceb9543b3f4cebb4167e9f3a5f.
This commit is contained in:
parent
ad7f269405
commit
90b92a2e5f
@ -0,0 +1,68 @@
|
||||
From https://github.com/libevent/libevent/commit/7870e85ecbfa09d79c66d382301ecd0a1e441c19
|
||||
From: kurtliu <kurtliu@tencent.com>
|
||||
Date: Wed, 24 Jan 2024 13:19:23 +0800
|
||||
Subject: [PATCH] install DESTINATION use CMAKE_INSTALL_<dir>
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1683,12 +1683,12 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigVersion.cmake.in
|
||||
|
||||
# Install compat headers
|
||||
install(FILES ${HDR_COMPAT}
|
||||
- DESTINATION "include"
|
||||
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
COMPONENT dev)
|
||||
|
||||
# Install public headers
|
||||
install(FILES ${HDR_PUBLIC}
|
||||
- DESTINATION "include/event2"
|
||||
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/event2"
|
||||
COMPONENT dev)
|
||||
|
||||
# Install the configs.
|
||||
@@ -1716,7 +1716,7 @@ endif()
|
||||
# Install the scripts.
|
||||
install(PROGRAMS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/event_rpcgen.py
|
||||
- DESTINATION "bin"
|
||||
+ DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
COMPONENT runtime)
|
||||
|
||||
# Create documents with doxygen.
|
||||
--- a/cmake/AddEventLibrary.cmake
|
||||
+++ b/cmake/AddEventLibrary.cmake
|
||||
@@ -36,9 +36,9 @@ endmacro()
|
||||
macro(export_install_target TYPE LIB_NAME)
|
||||
if("${LIB_NAME}" STREQUAL "event")
|
||||
install(TARGETS "${LIB_NAME}_${TYPE}"
|
||||
- LIBRARY DESTINATION "lib" COMPONENT lib
|
||||
- ARCHIVE DESTINATION "lib" COMPONENT lib
|
||||
- RUNTIME DESTINATION "lib" COMPONENT lib
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
|
||||
+ RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
|
||||
COMPONENT dev
|
||||
)
|
||||
else()
|
||||
@@ -62,9 +62,9 @@ macro(export_install_target TYPE LIB_NAME)
|
||||
)
|
||||
install(TARGETS "${LIB_NAME}_${TYPE}"
|
||||
EXPORT LibeventTargets-${TYPE}
|
||||
- LIBRARY DESTINATION "lib" COMPONENT lib
|
||||
- ARCHIVE DESTINATION "lib" COMPONENT lib
|
||||
- RUNTIME DESTINATION "lib" COMPONENT lib
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
|
||||
+ RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
|
||||
COMPONENT dev
|
||||
)
|
||||
endif()
|
||||
@@ -169,7 +169,7 @@ macro(add_event_library LIB_NAME)
|
||||
if (NOT WIN32)
|
||||
install(FILES
|
||||
"$<TARGET_FILE_DIR:${LIB_NAME}_shared>/${LIB_LINK_NAME}"
|
||||
- DESTINATION "lib"
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
COMPONENT lib)
|
||||
endif()
|
||||
endif()
|
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit libtool multilib-minimal verify-sig
|
||||
|
||||
|
72
sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.2.1-r4.ebuild
vendored
Normal file
72
sdk_container/src/third_party/portage-stable/dev-libs/libevent/libevent-2.2.1-r4.ebuild
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CMAKE_REMOVE_MODULES_LIST=( FindMbedTLS )
|
||||
|
||||
inherit cmake-multilib verify-sig
|
||||
|
||||
MY_P="${P}-alpha-dev"
|
||||
DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
|
||||
HOMEPAGE="
|
||||
https://libevent.org/
|
||||
https://github.com/libevent/libevent/
|
||||
"
|
||||
BASE_URI="https://github.com/libevent/libevent/releases/download/release-${PV}-alpha"
|
||||
SRC_URI="
|
||||
${BASE_URI}/${MY_P}.tar.gz
|
||||
verify-sig? (
|
||||
${BASE_URI}/${MY_P}.tar.gz.asc
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/2.2.1-r2"
|
||||
KEYWORDS=""
|
||||
IUSE="
|
||||
+clock-gettime debug malloc-replacement mbedtls +ssl static-libs
|
||||
test verbose-debug
|
||||
"
|
||||
# TODO: hangs
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="
|
||||
mbedtls? ( net-libs/mbedtls:3=[${MULTILIB_USEDEP}] )
|
||||
ssl? ( >=dev-libs/openssl-1.0.1h-r2:=[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
verify-sig? (
|
||||
sec-keys/openpgp-keys-libevent
|
||||
)
|
||||
"
|
||||
|
||||
DOCS=( README.md ChangeLog{,-2.0} whatsnew-2.{0,1}.txt )
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/event2/event-config.h
|
||||
)
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libevent.asc
|
||||
|
||||
PATCHES=(
|
||||
# signalfd-by-default breaks at least app-misc/tmux
|
||||
# https://github.com/libevent/libevent/pull/1486
|
||||
"${FILESDIR}/${P}-disable-signalfd.patch"
|
||||
"${FILESDIR}/${P}-cmake-install-paths.patch"
|
||||
)
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DEVENT__DISABLE_CLOCK_GETTIME=$(usex !clock-gettime)
|
||||
-DEVENT__DISABLE_DEBUG_MODE=$(usex !debug)
|
||||
-DEVENT__DISABLE_MBEDTLS=$(usex !mbedtls)
|
||||
-DEVENT__DISABLE_MM_REPLACEMENT=$(usex !malloc-replacement)
|
||||
-DEVENT__DISABLE_OPENSSL=$(usex !ssl)
|
||||
-DEVENT__LIBRARY_TYPE=$(usex static-libs BOTH SHARED)
|
||||
-DCMAKE_DEBUG_POSTFIX=""
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
@ -3,7 +3,9 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools git-r3 multilib-minimal
|
||||
CMAKE_REMOVE_MODULES_LIST=( FindMbedTLS )
|
||||
|
||||
inherit cmake-multilib git-r3
|
||||
|
||||
DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
|
||||
HOMEPAGE="
|
||||
@ -13,7 +15,7 @@ HOMEPAGE="
|
||||
EGIT_REPO_URI="https://github.com/libevent/libevent.git"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/2.2"
|
||||
SLOT="0/2.2.1-r2"
|
||||
KEYWORDS=""
|
||||
IUSE="
|
||||
+clock-gettime debug malloc-replacement mbedtls +ssl static-libs
|
||||
@ -23,43 +25,27 @@ IUSE="
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="
|
||||
mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] )
|
||||
mbedtls? ( net-libs/mbedtls:3=[${MULTILIB_USEDEP}] )
|
||||
ssl? ( >=dev-libs/openssl-1.0.1h-r2:=[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
|
||||
DOCS=( README.md ChangeLog{,-1.4,-2.0} whatsnew-2.{0,1}.txt )
|
||||
DOCS=( README.md ChangeLog{,-2.0,-2.1} whatsnew-2.{0,1}.txt )
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/event2/event-config.h
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# fix out-of-source builds
|
||||
mkdir -p test || die
|
||||
|
||||
local ECONF_SOURCE="${S}"
|
||||
local myconf=(
|
||||
$(use_enable clock-gettime)
|
||||
$(use_enable debug debug-mode)
|
||||
$(use_enable malloc-replacement malloc-replacement)
|
||||
$(use_enable mbedtls)
|
||||
$(use_enable ssl openssl)
|
||||
$(use_enable static-libs static)
|
||||
$(use_enable test libevent-regress)
|
||||
$(use_enable verbose-debug)
|
||||
--disable-samples
|
||||
local mycmakeargs=(
|
||||
-DEVENT__DISABLE_CLOCK_GETTIME=$(usex !clock-gettime)
|
||||
-DEVENT__DISABLE_DEBUG_MODE=$(usex !debug)
|
||||
-DEVENT__DISABLE_MBEDTLS=$(usex !mbedtls)
|
||||
-DEVENT__DISABLE_MM_REPLACEMENT=$(usex !malloc-replacement)
|
||||
-DEVENT__DISABLE_OPENSSL=$(usex !ssl)
|
||||
-DEVENT__LIBRARY_TYPE=$(usex static-libs BOTH SHARED)
|
||||
-DCMAKE_DEBUG_POSTFIX=""
|
||||
)
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
cmake_src_configure
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user