commit:     6eec73b734c8b62f076937e3879dd1d56fe912ec
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Sun Jan  4 06:10:54 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan  4 16:45:37 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6eec73b7

media-sound/darksnow: add 0.7.2 gtk3

update EAPI 7 -> 8

switch to gtk3
darksnow is part of darkice as darkice-gui since 1.4
update SRC_URI/HOMEPAGE and metadata

Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/45245
Closes: https://github.com/gentoo/gentoo/pull/45245
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-sound/darksnow/Manifest                      |  1 +
 media-sound/darksnow/darksnow-0.7.2.ebuild         | 53 ++++++++++++++++++++++
 .../darksnow/files/darksnow-0.7.2-Makefile.patch   | 41 +++++++++++++++++
 .../files/darksnow-0.7.2-fix_overflow.patch        | 34 ++++++++++++++
 media-sound/darksnow/metadata.xml                  | 11 +++--
 5 files changed, 136 insertions(+), 4 deletions(-)

diff --git a/media-sound/darksnow/Manifest b/media-sound/darksnow/Manifest
index ea60baac8fca..6b1a023c5c21 100644
--- a/media-sound/darksnow/Manifest
+++ b/media-sound/darksnow/Manifest
@@ -1 +1,2 @@
+DIST darkice-1.6.tar.gz 5565194 BLAKE2B 
285bb4a07682bce7b57925d5ab1d18e5b231417590e283da062ac13a00c19e782a2910316f8fd0d077e87df22b2cebf952d9980c09ecff8c0da4416b777e3e02
 SHA512 
efa66041850307a36c6a76000e62644ceba97b7ec7a0b4329c59a975fbf4ef617f961b7a7c0e5dc67b8c0f1d3b5baf03ae61202dedb4c55efe68662194acb112
 DIST darksnow-0.7.1.tar.gz 78928 BLAKE2B 
cae99522f8ae32bbd2c05c73b70896e71b5805fd6bb4054be0e498af1a502e7039a46223aa03bd781cab082e63f4705d2fae688c6f8a698dbfc8fced056e2684
 SHA512 
0ea1ff9f085127185d47169df358d2940fa9e52c52408bbaaefdf517402ddcb37b2df8b8c65bb22c3493820b47a3b4a2571cc819e81c70718684e8c3c3fe77ae

diff --git a/media-sound/darksnow/darksnow-0.7.2.ebuild 
b/media-sound/darksnow/darksnow-0.7.2.ebuild
new file mode 100644
index 000000000000..50a498cc1945
--- /dev/null
+++ b/media-sound/darksnow/darksnow-0.7.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools desktop xdg
+
+# darksnow is part of darkice as darkice-gui since 1.4
+MY_PN="darkice"
+MY_PV="1.6"
+MY_P="${MY_PN}-${MY_PV}"
+DESCRIPTION="Streaming GTK+ Front-End based on Darkice Ice Streamer"
+HOMEPAGE="https://github.com/rafael2k/darkice";
+SRC_URI="https://github.com/rafael2k/darkice/archive/v${MY_PV}.tar.gz -> 
${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}/${MY_PN}-gui/trunk"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+PDEPEND=">=media-sound/darkice-1.2"
+RDEPEND="
+       dev-libs/glib:2
+       x11-libs/gtk+:3
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       sys-devel/gettext
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-Makefile.patch
+       # PR pending https://github.com/rafael2k/darkice/pull/208.patch
+       "${FILESDIR}"/${P}-fix_overflow.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_compile() {
+       default
+       emake -C po
+}
+
+src_install() {
+       default
+       dodoc documentation/{CHANGES,CREDITS,README*}
+
+       domenu ${PN}.desktop
+}

diff --git a/media-sound/darksnow/files/darksnow-0.7.2-Makefile.patch 
b/media-sound/darksnow/files/darksnow-0.7.2-Makefile.patch
new file mode 100644
index 000000000000..ff094325a9ba
--- /dev/null
+++ b/media-sound/darksnow/files/darksnow-0.7.2-Makefile.patch
@@ -0,0 +1,41 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -38,8 +38,8 @@ CFLAGS+= -DUSE_TOOLTIP
+ 
+ all: darksnow
+ 
+-darksnow: darksnow.o interface.o config_files.o tooltips.o man_gzip
+-      $(CC) $(LDFLAGS) darksnow.o interface.o config_files.o tooltips.o -o 
darksnow  @GTK_LIBS@ @GTK_CFLAGS@ -DVERSION="\"$(VERSION)\""
++darksnow: darksnow.o interface.o config_files.o tooltips.o
++      $(CC) $(CFLAGS) $(LDFLAGS) darksnow.o interface.o config_files.o 
tooltips.o -o darksnow  @GTK_LIBS@ @GTK_CFLAGS@ -DVERSION="\"$(VERSION)\""
+ 
+ darksnow.o: darksnow.c
+       $(CC) $(CFLAGS) $(FUNNY) @GTK_CFLAGS@ -DINTLPREFIX="\"$(INTLPREFIX)\"" 
-DVERSION="\"$(VERSION)\"" -c darksnow.c -o darksnow.o
+@@ -57,15 +57,14 @@ man_gzip:
+       gzip -c man/darksnow.1 > man/darksnow.1.gz 
+ 
+ clean:
+-      rm -f *.o *~ darksnow man/darksnow.1.gz
++      rm -f *.o *~ darksnow
+       rm -rf slack darksnow.tgz
+ 
+ install: darksnow
+-      $(INSTALL) -D --mode=0755 darksnow $(PREFIX)/bin/darksnow
+-      $(INSTALL) -D --mode=0644 documentation/CHANGES 
$(PREFIX)/share/darksnow/changelog
+-      $(INSTALL) -D --mode=0644 po/pt_BR.mo 
$(PREFIX)/share/locale/pt_BR/LC_MESSAGES/darksnow.mo
+-      $(INSTALL) -D --mode=0644 icon/darksnow_icon.png 
$(PREFIX)/share/icons/hicolor/32x32/apps/darksnow.png
+-      $(INSTALL) -D --mode=0644 man/darksnow.1.gz 
$(PREFIX)/share/man/man1/darksnow.1.gz
++      $(INSTALL) -D --mode=0755 darksnow $(DESTDIR)$(PREFIX)/bin/darksnow
++      $(INSTALL) -D --mode=0644 po/pt_BR.mo 
$(DESTDIR)$(PREFIX)/share/locale/pt_BR/LC_MESSAGES/darksnow.mo
++      $(INSTALL) -D --mode=0644 icon/darksnow_icon.png 
$(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/darksnow.png
++      $(INSTALL) -D --mode=0644 man/darksnow.1 
$(DESTDIR)$(PREFIX)/share/man/man1/darksnow.1
+ 
+ make_pkg: darksnow
+       echo "Remember to run this option as root!"
+@@ -89,5 +89,5 @@ upgrade_pkg: make_pkg
+       /sbin/upgradepkg darksnow-*-1rd.tgz
+ 
+ dist-clean: clean
+-      rm aclocal.m4 config.status config.log man/darksnow.1.gz Makefile
++      rm aclocal.m4 config.status config.log Makefile
+       rm -r autom4te.cache

diff --git a/media-sound/darksnow/files/darksnow-0.7.2-fix_overflow.patch 
b/media-sound/darksnow/files/darksnow-0.7.2-fix_overflow.patch
new file mode 100644
index 000000000000..bca543a75822
--- /dev/null
+++ b/media-sound/darksnow/files/darksnow-0.7.2-fix_overflow.patch
@@ -0,0 +1,34 @@
+PR pending https://github.com/rafael2k/darkice/pull/208.patch
+fix compiler warning and buffer overflow with strcat and strncpy
+> In function ‘strcat’,
+>     inlined from ‘main’ at darksnow.c:227:3:
+> /usr/include/bits/string_fortified.h:140:10: warning: 
‘__builtin___strcat_chk’ forming offset [16, 17] 
+> is out of the bounds [0, 16] of object ‘locale’ with type ‘char[16]’ 
[-Warray-bounds=]
+
+> interface.c: In function ‘status_loop’:
+> interface.c:280:5: warning: ‘__builtin_strncpy’ output truncated before 
terminating nul copying 1 byte 
+> from a string of the same length [-Wstringop-truncation]
+>   280 |     strncpy((char *) shared_area+1, "0", 1);
+>       |     ^
+--- a/darksnow.c
++++ b/darksnow.c
+@@ -170,7 +170,7 @@ int main( int  argc, char *argv[], char *envp[]) {
+   DIR *directory;
+   char *foo;
+   char bar[256];
+-  char locale[16];
++  char locale[128];
+   int i = 0, j = 0, fd;
+ 
+   if (!gtk_init_check (&argc, &argv)) {
+--- a/interface.c
++++ b/interface.c
+@@ -277,7 +277,7 @@ gboolean status_loop (gboolean foo) {
+       alarm_id = g_timeout_add (4000, (GSourceFunc) text_box_loop, 0);
+     }
+ 
+-    strncpy((char *) shared_area+1, "0", 1);  
++    memcpy(shared_area+1, "0", 1);  
+   }
+ 
+   /* I need nothing from child, just do this to prevent <defunct> processes */

diff --git a/media-sound/darksnow/metadata.xml 
b/media-sound/darksnow/metadata.xml
index b69a849fd57e..a98fdbc1d4db 100644
--- a/media-sound/darksnow/metadata.xml
+++ b/media-sound/darksnow/metadata.xml
@@ -1,8 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
-<maintainer type="project">
-       <email>[email protected]</email>
-       <name>Gentoo Sound project</name>
-</maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Sound project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">rafael2k/darkice</remote-id>
+       </upstream>
 </pkgmetadata>

Reply via email to