commit:     c5c686099e777dd3a71386bc70ca5d8831f75660
Author:     Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Mon Mar  2 20:14:50 2026 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Mon Mar  2 20:19:58 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c5c68609

media-gfx/dustr: add 0_p20221008

Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>

 media-gfx/dustr/Manifest                           |  1 +
 media-gfx/dustr/dustr-0_p20221008.ebuild           | 44 ++++++++++++++++++++++
 media-gfx/dustr/dustr-9999.ebuild                  | 23 +++++++++--
 .../dustr-0_p20221008-make-cflags-ldflags.patch    | 36 ++++++++++++++++++
 4 files changed, 100 insertions(+), 4 deletions(-)

diff --git a/media-gfx/dustr/Manifest b/media-gfx/dustr/Manifest
new file mode 100644
index 0000000000..e3dcdc9390
--- /dev/null
+++ b/media-gfx/dustr/Manifest
@@ -0,0 +1 @@
+DIST dustr-3465a079e4c1e52f798675b913f6e79204b9f5cc.tar.gz 8152 BLAKE2B 
014a6b71472e5a95fda6f46a47991995c1a44fdf6cb882a48c792db13403d9b92d114dbf0bbeee0eb2562fe26aa4f434e369abdc9310c60612623e6a0293b1f9
 SHA512 
537490c0b7c4e4285a83cc257b959f39edfb5e791a30945dc296a26956fdc3ee9406d9327c362bf869a0a84c22ce0ee525fb522163f59952014ade9e389d7565

diff --git a/media-gfx/dustr/dustr-0_p20221008.ebuild 
b/media-gfx/dustr/dustr-0_p20221008.ebuild
new file mode 100644
index 0000000000..4445c5bc67
--- /dev/null
+++ b/media-gfx/dustr/dustr-0_p20221008.ebuild
@@ -0,0 +1,44 @@
+# Copyright 2020-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+if [[ "${PV}" = *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/aearil/dustr.git";
+else
+       EGIT_COMMIT="3465a079e4c1e52f798675b913f6e79204b9f5cc"
+       SRC_URI="https://github.com/aearil/dustr/archive/${EGIT_COMMIT}.tar.gz 
-> ${PN}-${EGIT_COMMIT}.tar.gz"
+       KEYWORDS="~amd64"
+       S="${WORKDIR}/${PN}-${EGIT_COMMIT}/"
+fi
+
+DESCRIPTION="light and interactive tool your crops need"
+HOMEPAGE="https://github.com/aearil/dustr";
+LICENSE="MIT"
+SLOT="0"
+
+DEPEND="
+       media-libs/libpng:=
+       media-libs/libjpeg-turbo:=
+       media-libs/libsdl2:=
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/dustr-0_p20221008-make-cflags-ldflags.patch"
+)
+
+src_compile() {
+       tc-export CC
+
+       default
+}
+
+src_install() {
+       einstalldocs
+
+       DESTDIR="${ED}" emake install PREFIX="/usr"
+}

diff --git a/media-gfx/dustr/dustr-9999.ebuild 
b/media-gfx/dustr/dustr-9999.ebuild
index dd97d5101f..ac41cc517b 100644
--- a/media-gfx/dustr/dustr-9999.ebuild
+++ b/media-gfx/dustr/dustr-9999.ebuild
@@ -1,13 +1,22 @@
-# Copyright 2020-2021 Gentoo Authors
+# Copyright 2020-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-inherit git-r3
+inherit toolchain-funcs
+
+if [[ "${PV}" = *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/aearil/dustr.git";
+else
+       EGIT_COMMIT="3465a079e4c1e52f798675b913f6e79204b9f5cc"
+       SRC_URI="https://github.com/aearil/dustr/archive/${EGIT_COMMIT}.tar.gz 
-> ${PN}-${EGIT_COMMIT}.tar.gz"
+       KEYWORDS="~amd64"
+       S="${WORKDIR}/${PN}-${EGIT_COMMIT}/"
+fi
 
 DESCRIPTION="light and interactive tool your crops need"
 HOMEPAGE="https://github.com/aearil/dustr";
-EGIT_REPO_URI="https://github.com/aearil/dustr.git";
 LICENSE="MIT"
 SLOT="0"
 
@@ -18,6 +27,12 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+src_compile() {
+       tc-export CC
+
+       default
+}
+
 src_install() {
        einstalldocs
 

diff --git a/media-gfx/dustr/files/dustr-0_p20221008-make-cflags-ldflags.patch 
b/media-gfx/dustr/files/dustr-0_p20221008-make-cflags-ldflags.patch
new file mode 100644
index 0000000000..99b62fb3c3
--- /dev/null
+++ b/media-gfx/dustr/files/dustr-0_p20221008-make-cflags-ldflags.patch
@@ -0,0 +1,36 @@
+From e17072a255443b7f0568483dfc8de3742f9d8d63 Mon Sep 17 00:00:00 2001
+From: "Haelwenn (lanodan) Monnier" <[email protected]>
+Date: Mon, 2 Mar 2026 21:06:55 +0100
+Subject: [PATCH] Makefile: Default to CFLAGS/LDFLAGS from environment
+X-Archived-At: https://github.com/aearil/dustr/pull/3
+
+Requires to always pass -std=c99, and order $LDFLAGS and $LIBS
+correctly to prevent linking issues with LDFLAGS=-Wl,--as-needed
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2385b2e..1aaab81 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,15 +1,15 @@
+ PREFIX = /usr/local
+ MANPREFIX = $(PREFIX)/share/man
+-CFLAGS   = -std=c99 -pedantic -Wall -Wextra -Os
+-LDFLAGS  = -s
++CFLAGS   ?= -pedantic -Wall -Wextra -Os
++LDFLAGS  ?= -s
+ LIBS = -lSDL2 -lpng -ljpeg
+ CC ?= cc
+ 
+ dustr: dustr.o util.o img.o
+-      $(CC) $(LDFLAGS) $(LIBS) $^ -o $@
++      $(CC) -std=c99 -o $@ $^ $(LDFLAGS) $(LIBS)
+ 
+ %.o: %.c util.h img.h
+-      $(CC) $(CFLAGS) -c $< -o $@
++      $(CC) -std=c99 $(CFLAGS) -c $< -o $@
+ 
+ install: dustr
+       mkdir -p "$(DESTDIR)$(PREFIX)/bin"

Reply via email to