mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 15:13:31 -04:00
app-admin/ananicy-cpp: new package, add 1.0.0_rc6
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
1
app-admin/ananicy-cpp/Manifest
Normal file
1
app-admin/ananicy-cpp/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST ananicy-cpp-v1.0.0-rc6.tar.bz2 41819 BLAKE2B f2d051e12784a66a141c294dd38c84f3d7d392cad0b8e7c8e563b11990695493ceb326df30869ca3647ac19be5eeda1e360e5dd358e1ab7e6af32f58cb240fbf SHA512 8703fd4a12a7a81385f6289a3eb16f7f42f160eebfc3493b3f82eeb2b104539e1911dafcacfc772a2add71dec89bcf94e53958021868f999bdfd1bdf06edac32
|
||||
49
app-admin/ananicy-cpp/ananicy-cpp-1.0.0_rc6.ebuild
Normal file
49
app-admin/ananicy-cpp/ananicy-cpp-1.0.0_rc6.ebuild
Normal file
@@ -0,0 +1,49 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MYPV="${PV/_rc/-rc}"
|
||||
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="Ananicy rewritten in C++ for much lower CPU and memory usage"
|
||||
HOMEPAGE="https://gitlab.com/ananicy-cpp/ananicy-cpp"
|
||||
SRC_URI="https://gitlab.com/ananicy-cpp/ananicy-cpp/-/archive/v${MYPV}/${PN}-v${MYPV}.tar.bz2"
|
||||
S="${WORKDIR}/${PN}-v${MYPV}"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="systemd"
|
||||
|
||||
RDEPEND="
|
||||
dev-cpp/nlohmann_json
|
||||
dev-libs/libfmt
|
||||
dev-libs/spdlog
|
||||
systemd? ( sys-apps/systemd )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-cpp/std-format
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-system-std-format.patch"
|
||||
"${FILESDIR}/${P}-respect-flags.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DENABLE_SYSTEMD=$(usex systemd)
|
||||
-DUSE_EXTERNAL_FMTLIB=ON
|
||||
-DUSE_EXTERNAL_JSON=ON
|
||||
-DUSE_EXTERNAL_SPDLOG=ON
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
doinitd "${FILESDIR}/${PN}.initd"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--- b/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
|
||||
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2")
|
||||
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/version.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/include/version.hpp)
|
||||
|
||||
@@ -83,10 +83,6 @@
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto")
|
||||
endif()
|
||||
|
||||
-if(CXX_ACCEPTS_SANITIZE AND NOT(STATIC))
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||
-endif()
|
||||
-
|
||||
if(OPTIMIZE_FOR_NATIVE_MICROARCH AND CXX_ACCEPTS_MARCH_NATIVE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
||||
endif()
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -193,10 +193,8 @@
|
||||
|
||||
# std::format
|
||||
set(STL_FORMAT_USE_EXTERNAL_FMTLIB ${USE_EXTERNAL_FMTLIB} CACHE BOOL "" FORCE)
|
||||
-if (NOT TARGET stl_polyfill::format)
|
||||
- add_subdirectory(external/std-format)
|
||||
-endif()
|
||||
-target_link_libraries(ananicy-cpp PRIVATE stl_polyfill::format)
|
||||
+find_package(StlPolyfillFormat REQUIRED)
|
||||
+target_include_directories(ananicy-cpp PRIVATE "/usr/include/polyfills/format")
|
||||
|
||||
|
||||
# spdlog
|
||||
@@ -242,4 +240,4 @@
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ananicy-cpp.service
|
||||
DESTINATION lib/systemd/system/
|
||||
COMPONENT Runtime)
|
||||
-endif()
|
||||
\ Manca newline alla fine del file
|
||||
+endif()
|
||||
18
app-admin/ananicy-cpp/files/ananicy-cpp.initd
Normal file
18
app-admin/ananicy-cpp/files/ananicy-cpp.initd
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
pidfile="/run/ananicy-cpp.pid"
|
||||
command="/usr/bin/ananicy-cpp"
|
||||
command_args="start"
|
||||
command_background=true
|
||||
|
||||
start_pre() {
|
||||
/usr/sbin/sysctl -e kernel.sched_autogroup_enabled=0
|
||||
}
|
||||
|
||||
stop_post() {
|
||||
/usr/sbin/sysctl -e kernel.sched_autogroup_enabled=1
|
||||
}
|
||||
|
||||
stop() {
|
||||
start-stop-daemon --stop --pidfile "$pidfile"
|
||||
}
|
||||
12
app-admin/ananicy-cpp/metadata.xml
Normal file
12
app-admin/ananicy-cpp/metadata.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>lssndrbarbieri@gmail.com</email>
|
||||
<name>Alessandro Barbieri</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://gitlab.com/ananicy-cpp/ananicy-cpp/-/issues</bugs-to>
|
||||
<remote-id type="gitlab">ananicy-cpp/ananicy-cpp</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user