* [gentoo-commits] repo/proj/guru:dev commit in: app-admin/ananicy-cpp/, app-admin/ananicy-cpp/files/
@ 2022-04-26 10:33 Alessandro Barbieri
0 siblings, 0 replies; only message in thread
From: Alessandro Barbieri @ 2022-04-26 10:33 UTC (permalink / raw
To: gentoo-commits
commit: 572b4347fe669ee9e25670dee321eb32a74ca1a1
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon Apr 25 17:52:33 2022 +0000
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Apr 26 10:33:34 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=572b4347
app-admin/ananicy-cpp: new package, add 1.0.0_rc6
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
app-admin/ananicy-cpp/Manifest | 1 +
app-admin/ananicy-cpp/ananicy-cpp-1.0.0_rc6.ebuild | 49 ++++++++++++++++++++++
.../ananicy-cpp-1.0.0_rc6-respect-flags.patch | 22 ++++++++++
.../ananicy-cpp-1.0.0_rc6-system-std-format.patch | 22 ++++++++++
app-admin/ananicy-cpp/files/ananicy-cpp.initd | 18 ++++++++
app-admin/ananicy-cpp/metadata.xml | 12 ++++++
6 files changed, 124 insertions(+)
diff --git a/app-admin/ananicy-cpp/Manifest b/app-admin/ananicy-cpp/Manifest
new file mode 100644
index 000000000..1a88d03ac
--- /dev/null
+++ b/app-admin/ananicy-cpp/Manifest
@@ -0,0 +1 @@
+DIST ananicy-cpp-v1.0.0-rc6.tar.bz2 41819 BLAKE2B f2d051e12784a66a141c294dd38c84f3d7d392cad0b8e7c8e563b11990695493ceb326df30869ca3647ac19be5eeda1e360e5dd358e1ab7e6af32f58cb240fbf SHA512 8703fd4a12a7a81385f6289a3eb16f7f42f160eebfc3493b3f82eeb2b104539e1911dafcacfc772a2add71dec89bcf94e53958021868f999bdfd1bdf06edac32
diff --git a/app-admin/ananicy-cpp/ananicy-cpp-1.0.0_rc6.ebuild b/app-admin/ananicy-cpp/ananicy-cpp-1.0.0_rc6.ebuild
new file mode 100644
index 000000000..adb59f5d1
--- /dev/null
+++ b/app-admin/ananicy-cpp/ananicy-cpp-1.0.0_rc6.ebuild
@@ -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"
+}
diff --git a/app-admin/ananicy-cpp/files/ananicy-cpp-1.0.0_rc6-respect-flags.patch b/app-admin/ananicy-cpp/files/ananicy-cpp-1.0.0_rc6-respect-flags.patch
new file mode 100644
index 000000000..7087d3e31
--- /dev/null
+++ b/app-admin/ananicy-cpp/files/ananicy-cpp-1.0.0_rc6-respect-flags.patch
@@ -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()
diff --git a/app-admin/ananicy-cpp/files/ananicy-cpp-1.0.0_rc6-system-std-format.patch b/app-admin/ananicy-cpp/files/ananicy-cpp-1.0.0_rc6-system-std-format.patch
new file mode 100644
index 000000000..adf7c941e
--- /dev/null
+++ b/app-admin/ananicy-cpp/files/ananicy-cpp-1.0.0_rc6-system-std-format.patch
@@ -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()
diff --git a/app-admin/ananicy-cpp/files/ananicy-cpp.initd b/app-admin/ananicy-cpp/files/ananicy-cpp.initd
new file mode 100644
index 000000000..4d41fcbc1
--- /dev/null
+++ b/app-admin/ananicy-cpp/files/ananicy-cpp.initd
@@ -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"
+}
diff --git a/app-admin/ananicy-cpp/metadata.xml b/app-admin/ananicy-cpp/metadata.xml
new file mode 100644
index 000000000..1c30cc80a
--- /dev/null
+++ b/app-admin/ananicy-cpp/metadata.xml
@@ -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>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-26 10:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-26 10:33 [gentoo-commits] repo/proj/guru:dev commit in: app-admin/ananicy-cpp/, app-admin/ananicy-cpp/files/ Alessandro Barbieri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox