From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 41845158089 for ; Wed, 4 Oct 2023 19:37:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7C55B2BC025; Wed, 4 Oct 2023 19:37:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 639D22BC025 for ; Wed, 4 Oct 2023 19:37:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 84DD6335CDF for ; Wed, 4 Oct 2023 19:37:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E9EE599B for ; Wed, 4 Oct 2023 19:37:47 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1696447671.1938edbd945efdfbf977f01b8755e54e8a345b7c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/razercfg/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/razercfg/razercfg-0.42-r1.ebuild X-VCS-Directories: sys-apps/razercfg/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 1938edbd945efdfbf977f01b8755e54e8a345b7c X-VCS-Branch: master Date: Wed, 4 Oct 2023 19:37:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4ddc948f-b7d2-4c58-81f4-b5404913d986 X-Archives-Hash: 6c621744f603c7a8c493b05db57ffdbf commit: 1938edbd945efdfbf977f01b8755e54e8a345b7c Author: Sam James gentoo org> AuthorDate: Wed Oct 4 19:27:38 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Oct 4 19:27:51 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1938edbd sys-apps/razercfg: don't redefine _FORTIFY_SOURCE Closes: https://bugs.gentoo.org/898046 Signed-off-by: Sam James gentoo.org> sys-apps/razercfg/razercfg-0.42-r1.ebuild | 99 +++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/sys-apps/razercfg/razercfg-0.42-r1.ebuild b/sys-apps/razercfg/razercfg-0.42-r1.ebuild new file mode 100644 index 000000000000..d4ebc90bca0f --- /dev/null +++ b/sys-apps/razercfg/razercfg-0.42-r1.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..10} ) + +inherit cmake python-single-r1 systemd tmpfiles udev xdg-utils + +DESCRIPTION="Utility for advanced configuration of Razer mice" +HOMEPAGE="https://bues.ch/cms/hacking/razercfg.html https://github.com/mbuesch/razer" +SRC_URI="https://bues.ch/${PN}/${P}.tar.xz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gui +udev" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND="${PYTHON_DEPS} + virtual/libusb:1 +" +BDEPEND="virtual/pkgconfig" +RDEPEND="${DEPEND} + gui? ( + $(python_gen_cond_dep ' + dev-python/PyQt5[${PYTHON_USEDEP}] + ') + ) + udev? ( virtual/udev ) +" + +PATCHES=( "${FILESDIR}/${PN}-0.39-unit-variables.patch" ) + +src_prepare() { + cmake_src_prepare + + # Don't clobber toolchain defaults + sed -i -e '/-D_FORTIFY_SOURCE=2/d' scripts/cmake.global || die + + sed -i librazer/CMakeLists.txt \ + -e '/ldconfig/{N;d}' \ + -e "s:DESTINATION lib:DESTINATION $(get_libdir):" \ + || die + + sed -i ui/razercfg.desktop.template \ + -e '/^Categories=/s/=.*$/=Qt;Settings/' \ + || die +} + +src_configure() { + local mycmakeargs=( + -DPYTHON="${PYTHON}" + -DSYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" + -DUDEV_DIR="$(get_udevdir)" + ) + RAZERCFG_PKG_BUILD=1 cmake_src_configure +} + +src_install() { + RAZERCFG_PKG_BUILD=1 cmake_src_install + + python_optimize + + newinitd "${FILESDIR}"/razerd.init.d-r2 razerd + dodoc README.* HACKING.* razer.conf + + if ! use gui; then + rm "${D}"/usr/bin/qrazercfg{,-applet} || die + rm -r "${D}"/usr/share/icons || die + rm -r "${D}"/usr/share/applications || die + fi + + # sys-power/pm-utils is deprecated, so we delete related files + # (they contain a hook for resume from suspend) + # TODO: test resume from suspend + rm -r "${D}/etc/pm" || die +} + +pkg_postinst() { + if use udev ; then + udevadm control --reload-rules + udevadm trigger --subsystem-match=usb + fi + + xdg_icon_cache_update + + tmpfiles_process razerd.conf + + if [[ -e "${ROOT}/usr/bin/pyrazer.pyc" ]]; then + eerror "A stale ${ROOT}/usr/bin/pyrazer.pyc exists and will prevent" + eerror "the Python frontends from working until removed manually." + fi +} + +pkg_postrm() { + xdg_icon_cache_update +}