media-gfx/dustr: add 0_p20221008

Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
This commit is contained in:
Haelwenn (lanodan) Monnier
2026-03-02 21:14:50 +01:00
parent c8eb771820
commit c5c686099e
4 changed files with 100 additions and 4 deletions

1
media-gfx/dustr/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST dustr-3465a079e4c1e52f798675b913f6e79204b9f5cc.tar.gz 8152 BLAKE2B 014a6b71472e5a95fda6f46a47991995c1a44fdf6cb882a48c792db13403d9b92d114dbf0bbeee0eb2562fe26aa4f434e369abdc9310c60612623e6a0293b1f9 SHA512 537490c0b7c4e4285a83cc257b959f39edfb5e791a30945dc296a26956fdc3ee9406d9327c362bf869a0a84c22ce0ee525fb522163f59952014ade9e389d7565

View File

@@ -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"
}

View File

@@ -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

View File

@@ -0,0 +1,36 @@
From e17072a255443b7f0568483dfc8de3742f9d8d63 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
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"