public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Roman" <davidroman96@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-gfx/nsxiv/
Date: Mon,  2 Oct 2023 12:27:07 +0000 (UTC)	[thread overview]
Message-ID: <1696249299.0d65b247b839fc2574f59722d650ab04b3a5f803.davidroman@gentoo> (raw)

commit:     0d65b247b839fc2574f59722d650ab04b3a5f803
Author:     NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Mon Oct  2 12:18:32 2023 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Oct  2 12:21:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0d65b247

media-gfx/nsxiv: add debug useflag

v32 changed from having assertions enabled by default to having them
disabled. explicitly passing `-DDEBUG` is now required to enable
assertions.

Signed-off-by: NRK <nrk <AT> disroot.org>

 media-gfx/nsxiv/nsxiv-32.ebuild   | 9 ++++++---
 media-gfx/nsxiv/nsxiv-9999.ebuild | 9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/media-gfx/nsxiv/nsxiv-32.ebuild b/media-gfx/nsxiv/nsxiv-32.ebuild
index 21454ad79b..289eb79656 100644
--- a/media-gfx/nsxiv/nsxiv-32.ebuild
+++ b/media-gfx/nsxiv/nsxiv-32.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="https://codeberg.org/nsxiv/nsxiv"
 
 LICENSE="GPL-2+ public-domain"
 SLOT="0"
-IUSE="+statusbar +inotify exif"
+IUSE="+statusbar +inotify exif debug"
 
 RDEPEND="
 	x11-libs/libX11
@@ -43,12 +43,15 @@ src_prepare() {
 }
 
 src_configure() {
+	# avoid rebuild on `make install`
 	sed -i -e '/^install: / s|: all|:|' Makefile || die
-	sed -i -e 's|^CFLAGS =|CFLAGS +=|;s|-O2 ||;' config.mk || die
 }
 
 src_compile() {
-	emake CC="$(tc-getCC)" OPT_DEP_DEFAULT=0 \
+	local dbg=""
+	use debug && dbg="-UNDEBUG -DDEBUG"
+	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${dbg}" \
+		OPT_DEP_DEFAULT=0 \
 		HAVE_INOTIFY="$(usex inotify 1 0)" \
 		HAVE_LIBFONTS="$(usex statusbar 1 0)" \
 		HAVE_LIBEXIF="$(usex exif 1 0)"

diff --git a/media-gfx/nsxiv/nsxiv-9999.ebuild b/media-gfx/nsxiv/nsxiv-9999.ebuild
index 21454ad79b..289eb79656 100644
--- a/media-gfx/nsxiv/nsxiv-9999.ebuild
+++ b/media-gfx/nsxiv/nsxiv-9999.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="https://codeberg.org/nsxiv/nsxiv"
 
 LICENSE="GPL-2+ public-domain"
 SLOT="0"
-IUSE="+statusbar +inotify exif"
+IUSE="+statusbar +inotify exif debug"
 
 RDEPEND="
 	x11-libs/libX11
@@ -43,12 +43,15 @@ src_prepare() {
 }
 
 src_configure() {
+	# avoid rebuild on `make install`
 	sed -i -e '/^install: / s|: all|:|' Makefile || die
-	sed -i -e 's|^CFLAGS =|CFLAGS +=|;s|-O2 ||;' config.mk || die
 }
 
 src_compile() {
-	emake CC="$(tc-getCC)" OPT_DEP_DEFAULT=0 \
+	local dbg=""
+	use debug && dbg="-UNDEBUG -DDEBUG"
+	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${dbg}" \
+		OPT_DEP_DEFAULT=0 \
 		HAVE_INOTIFY="$(usex inotify 1 0)" \
 		HAVE_LIBFONTS="$(usex statusbar 1 0)" \
 		HAVE_LIBEXIF="$(usex exif 1 0)"


             reply	other threads:[~2023-10-02 12:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 12:27 David Roman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-01 21:51 [gentoo-commits] repo/proj/guru:master commit in: media-gfx/nsxiv/ Lucio Sauer
2024-06-28 21:44 David Roman
2024-05-25 15:48 Julien Roy
2024-05-15 12:36 Julien Roy
2024-05-15 12:36 Julien Roy
2023-10-02 12:24 David Roman
2023-05-21  7:23 Viorel Munteanu
2023-05-21  7:23 Viorel Munteanu
2023-01-29 10:40 Viorel Munteanu
2023-01-10  8:37 Haelwenn Monnier
2023-01-10  8:37 Haelwenn Monnier
2022-08-11 13:45 Andrew Ammerlaan
2022-06-18 19:19 Andrew Ammerlaan
2022-06-13 10:49 Andrew Ammerlaan
2022-03-07 15:15 Ronny Gutbrod
2021-09-24  8:28 Arthur Zamarin
2021-09-17  1:57 Haelwenn Monnier

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=1696249299.0d65b247b839fc2574f59722d650ab04b3a5f803.davidroman@gentoo \
    --to=davidroman96@gmail.com \
    --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