public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/razercfg/
Date: Wed,  4 Oct 2023 19:37:47 +0000 (UTC)	[thread overview]
Message-ID: <1696447671.1938edbd945efdfbf977f01b8755e54e8a345b7c.sam@gentoo> (raw)

commit:     1938edbd945efdfbf977f01b8755e54e8a345b7c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  4 19:27:38 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> 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
+}


             reply	other threads:[~2023-10-04 19:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 19:37 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-15 18:49 [gentoo-commits] repo/gentoo:master commit in: sys-apps/razercfg/ Arthur Zamarin
2024-06-14  9:00 Arthur Zamarin
2023-05-04  4:18 Viorel Munteanu
2022-05-26  1:14 Sam James
2021-09-03  1:53 Sam James
2021-05-23 16:34 Michał Górny
2021-01-01  1:56 Michał Górny
2020-07-24  8:28 Joonas Niilola
2020-07-24  8:28 Joonas Niilola
2020-07-24  8:28 Joonas Niilola
2020-02-09 16:42 Michał Górny
2018-03-22 14:57 Andreas Sturmlechner
2017-10-16  3:34 David Seifert
2017-05-06 20:25 Michael Orlitzky
2017-05-06 20:25 Michael Orlitzky
2017-04-20 16:41 David Seifert
2017-03-24 15:14 Wolfram Schlich
2016-07-07 19:48 Austin English
2016-06-11 20:39 Pacho Ramos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1696447671.1938edbd945efdfbf977f01b8755e54e8a345b7c.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox