mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 13:33:32 -04:00
dev-libs/ls-hpack: fix to overwrites CFLAGS/CXXFLAGS and fix install
Signed-off-by: Okamura Kazuya <gentoo-guru@danceylove.net>
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index e68af65..22830bc 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -37,20 +37,11 @@ ENDIF()
|
||||||
|
IF (CMAKE_C_COMPILER_ID STREQUAL GNU
|
||||||
|
OR CMAKE_C_COMPILER_ID STREQUAL Clang)
|
||||||
|
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -Wall -Wextra -Wno-unused-parameter")
|
||||||
|
- SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -fno-omit-frame-pointer")
|
||||||
|
INCLUDE(CheckCCompilerFlag)
|
||||||
|
CHECK_C_COMPILER_FLAG(-Wno-implicit-fallthrough HAS_NO_IMPLICIT_FALLTHROUGH)
|
||||||
|
IF (HAS_NO_IMPLICIT_FALLTHROUGH)
|
||||||
|
SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -Wno-implicit-fallthrough")
|
||||||
|
ENDIF()
|
||||||
|
- IF (PROFILE EQUAL 1)
|
||||||
|
- SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -g -pg")
|
||||||
|
- ENDIF()
|
||||||
|
- IF (CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
|
- SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -g0 -O3")
|
||||||
|
- ELSE()
|
||||||
|
- SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -g3 -O0 -fsanitize=address")
|
||||||
|
- ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF (NOT CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
38
dev-libs/ls-hpack/ls-hpack-2.3.0-r1.ebuild
Normal file
38
dev-libs/ls-hpack/ls-hpack-2.3.0-r1.ebuild
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# Copyright 1999-2023 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit cmake
|
||||||
|
|
||||||
|
DESCRIPTION="QPACK compression library for use with HTTP/3"
|
||||||
|
HOMEPAGE="https://github.com/litespeedtech/ls-hpack/"
|
||||||
|
SRC_URI="https://github.com/litespeedtech/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
IUSE="static-libs"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-disable-overwrites-flags.patch
|
||||||
|
"${FILESDIR}"/${PN}-disable-tests.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local mycmakeargs=(
|
||||||
|
-DSHARED=$(usex !static-libs 1 0)
|
||||||
|
)
|
||||||
|
cmake_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cp ${S}_build/libls-hpack.* ${S} || die
|
||||||
|
newheader lshpack.h lshpack.h
|
||||||
|
if [[ $(usex static-libs) == "yes" ]] ; then
|
||||||
|
newlib.a libls-hpack.a libls-hpack.a
|
||||||
|
else
|
||||||
|
newlib.so libls-hpack.so libls-hpack.so
|
||||||
|
fi
|
||||||
|
einstalldocs
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user