[gentoo-commits] repo/gentoo:master commit in: media-sound/mp3info/, media-sound/mp3info/files/

2023-02-15 Thread Sam James
commit: 501d68999d858a4dea36114a599ec2aa57944b3d
Author: Sam James  gentoo  org>
AuthorDate: Wed Feb 15 09:51:44 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Feb 15 09:51:44 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=501d6899

media-sound/mp3info: fix build w/ musl

Closes: https://bugs.gentoo.org/717014
Signed-off-by: Sam James  gentoo.org>

 media-sound/mp3info/files/mp3info-0.8.5a-musl.patch | 12 
 media-sound/mp3info/mp3info-0.8.5a-r1.ebuild|  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/media-sound/mp3info/files/mp3info-0.8.5a-musl.patch 
b/media-sound/mp3info/files/mp3info-0.8.5a-musl.patch
new file mode 100644
index ..1b190c29d61d
--- /dev/null
+++ b/media-sound/mp3info/files/mp3info-0.8.5a-musl.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/717014
+--- a/mp3tech.c
 b/mp3tech.c
+@@ -279,7 +279,7 @@ char *header_mode(mp3header *h) {
+ }
+ 
+ int sameConstant(mp3header *h1, mp3header *h2) {
+-if((*(uint*)h1) == (*(uint*)h2)) return 1;
++if((*(unsigned int*)h1) == (*(unsigned int*)h2)) return 1;
+ 
+ if((h1->version   == h2->version ) &&
+(h1->layer == h2->layer   ) &&

diff --git a/media-sound/mp3info/mp3info-0.8.5a-r1.ebuild 
b/media-sound/mp3info/mp3info-0.8.5a-r1.ebuild
index 11ba9807f0ff..0015b7270459 100644
--- a/media-sound/mp3info/mp3info-0.8.5a-r1.ebuild
+++ b/media-sound/mp3info/mp3info-0.8.5a-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -27,6 +27,7 @@ PATCHES=(
"${FILESDIR}/${P}-ldflags.patch"
"${FILESDIR}/${P}-tinfo.patch"
"${FILESDIR}/${P}-format-security.patch"
+   "${FILESDIR}/${P}-musl.patch"
 )
 
 src_compile() {



[gentoo-commits] repo/gentoo:master commit in: media-sound/mp3info/, media-sound/mp3info/files/

2018-06-22 Thread Patrice Clement
commit: a64e78259432a21caae85b633496331235377130
Author: Azamat H. Hackimov  gmail  com>
AuthorDate: Sat Jun  9 19:26:36 2018 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Fri Jun 22 22:17:11 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a64e7825

media-sound/mp3info: patch against printf format issue.

Closes: https://bugs.gentoo.org/657668

Package-Manager: Portage-2.3.40, Repoman-2.3.9
Closes: https://github.com/gentoo/gentoo/pull/8771

 .../files/mp3info-0.8.5a-format-security.patch | 21 +++
 media-sound/mp3info/mp3info-0.8.5a-r1.ebuild   | 41 ++
 2 files changed, 62 insertions(+)

diff --git a/media-sound/mp3info/files/mp3info-0.8.5a-format-security.patch 
b/media-sound/mp3info/files/mp3info-0.8.5a-format-security.patch
new file mode 100644
index 000..5a8a749b55f
--- /dev/null
+++ b/media-sound/mp3info/files/mp3info-0.8.5a-format-security.patch
@@ -0,0 +1,21 @@
+diff -Nuar mp3info-0.8.5a.orig/textfunc.c mp3info-0.8.5a/textfunc.c
+--- mp3info-0.8.5a.orig/textfunc.c 2018-06-09 21:56:18.450985762 +0300
 mp3info-0.8.5a/textfunc.c  2018-06-09 22:09:07.164948467 +0300
+@@ -227,7 +227,7 @@
+ 
+   while((percent=strchr(format,'%'))) {
+   *percent=0;
+-  printf(format);
++  printf("%s", format);
+   *percent='%';
+   code=percent+1;
+   while(*code && (code[0] != '%' && !isalpha(*code))) code++;
+@@ -354,7 +354,7 @@
+   }
+   
+   }
+-  printf(format);
++  printf("%s", format);
+ }
+ 
+ 

diff --git a/media-sound/mp3info/mp3info-0.8.5a-r1.ebuild 
b/media-sound/mp3info/mp3info-0.8.5a-r1.ebuild
new file mode 100644
index 000..5982213a3da
--- /dev/null
+++ b/media-sound/mp3info/mp3info-0.8.5a-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs
+
+DESCRIPTION="An MP3 technical info viewer and ID3 1.x tag editor"
+HOMEPAGE="http://ibiblio.org/mp3info/;
+SRC_URI="http://ibiblio.org/pub/linux/apps/sound/mp3-utils/${PN}/${P}.tgz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux 
~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
+IUSE="gtk"
+
+RDEPEND="
+   gtk? ( >=x11-libs/gtk+-2.6.10:2 )
+   sys-libs/ncurses:0=
+"
+DEPEND="
+   ${RDEPEND}
+   virtual/pkgconfig
+"
+
+PATCHES=(
+   "${FILESDIR}/${P}-ldflags.patch"
+   "${FILESDIR}/${P}-tinfo.patch"
+   "${FILESDIR}/${P}-format-security.patch"
+)
+
+src_compile() {
+   tc-export PKG_CONFIG
+   emake mp3info $(usex gtk gmp3info '') CC="$(tc-getCC)" 
CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+   dobin mp3info $(usex gtk gmp3info '')
+
+   dodoc ChangeLog README
+   doman mp3info.1
+}