git: 337b8bde3efd - main - audio/id3edit: Add id3edit 2.2.1

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 12 Aug 2025 18:16:51 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=337b8bde3efda83d91c762e6b521060358120b1d

commit 337b8bde3efda83d91c762e6b521060358120b1d
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-08-12 17:41:26 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2025-08-12 18:15:27 +0000

    audio/id3edit: Add id3edit 2.2.1
    
    id3edit is a command line editor to edit and debug ID3v2 tags (ID3v2.3.0 &
    ID3v2.4.0 of mp3 files with full Unicode support.
    
    Its main features are:
    - Show all frames of the ID3 tag (colloquial "mp3 tags")
    - Get/Add/Edit specific frames (see Name Definitions)
    - Get/Add artworks (Support for jpeg and png. Create an issue if you need more
      types.)
    - Remove frames or the whole tag
    - Print hex-dump of a specific frame
    - You can overwrite the input file or write to a new path
    - It is made to handle invalid tags and headers and debug them
    - Can print a detailed list of all frames with comments when they are invalid
    - Supports Unicode correctly!
    - It works from command line
    - Support for ID3v2.3.0 (most common) and ID3v2.4.0 (latest)
    - All encodings supported (ISO 8859-1, UTF-16 with BOM, UTF-16BE, UTF-8)
    - Partial support of extended header: CRC feature supported!
---
 audio/Makefile          |  1 +
 audio/id3edit/Makefile  | 43 +++++++++++++++++++++++++++++++++++++++++++
 audio/id3edit/distinfo  |  3 +++
 audio/id3edit/pkg-descr | 18 ++++++++++++++++++
 4 files changed, 65 insertions(+)

diff --git a/audio/Makefile b/audio/Makefile
index c08a95c8cb50..3cba4fffc10f 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -280,6 +280,7 @@
     SUBDIR += icecast
     SUBDIR += icegenerator
     SUBDIR += ices
+    SUBDIR += id3edit
     SUBDIR += id3el
     SUBDIR += id3lib
     SUBDIR += id3mtag
diff --git a/audio/id3edit/Makefile b/audio/id3edit/Makefile
new file mode 100644
index 000000000000..64d95bc2d58e
--- /dev/null
+++ b/audio/id3edit/Makefile
@@ -0,0 +1,43 @@
+PORTNAME=	id3edit
+PORTVERSION=	2.2.1
+DISTVERSIONPREFIX=	v
+CATEGORIES=	audio
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	CLI tool to edit and debug ID3v2 tags of mp3 files
+WWW=		https://github.com/rstemmer/id3edit
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libprinthex.so:devel/libprinthex
+
+USES=		iconv localbase:ldflags
+
+CFLAGS+=	-DVERSION="\"${PORTVERSION}\"" -Wno-multichar
+LDFLAGS+=	-lprinthex -lz
+
+PLIST_FILES=	bin/id3dump \
+		bin/id3edit \
+		bin/id3frames \
+		bin/id3show
+
+FILES=		crc32 extheader frameflags id3v2 id3v2frame main rawfile \
+		encoding/crc encoding/size encoding/text
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	rstemmer
+
+do-build:
+.for file in ${FILES}
+	@${CC} ${CFLAGS} -I${WRKSRC} -c ${WRKSRC}/${file}.c -o ${WRKSRC}/${file}.o
+.endfor
+	@${CC} ${LDFLAGS} ${FILES:C|.*|${WRKSRC}/&.o|} -o ${WRKSRC}/id3edit
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/id3dump ${STAGEDIR}${PREFIX}/bin/id3dump
+	${INSTALL_PROGRAM} ${WRKSRC}/id3edit ${STAGEDIR}${PREFIX}/bin/id3edit
+	${INSTALL_SCRIPT} ${WRKSRC}/id3frames ${STAGEDIR}${PREFIX}/bin/id3frames
+	${INSTALL_SCRIPT} ${WRKSRC}/id3show ${STAGEDIR}${PREFIX}/bin/id3show
+
+.include <bsd.port.mk>
diff --git a/audio/id3edit/distinfo b/audio/id3edit/distinfo
new file mode 100644
index 000000000000..aa4f9f5b8720
--- /dev/null
+++ b/audio/id3edit/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1753796000
+SHA256 (rstemmer-id3edit-v2.2.1_GH0.tar.gz) = 110f50f8aa8ef2d74e2a8ddcf571359ec353d21e63f6321f2842bd185131a192
+SIZE (rstemmer-id3edit-v2.2.1_GH0.tar.gz) = 342252
diff --git a/audio/id3edit/pkg-descr b/audio/id3edit/pkg-descr
new file mode 100644
index 000000000000..1cbd82d507fd
--- /dev/null
+++ b/audio/id3edit/pkg-descr
@@ -0,0 +1,18 @@
+id3edit is a command line editor to edit and debug ID3v2 tags (ID3v2.3.0 &
+ID3v2.4.0 of mp3 files with full Unicode support.
+
+Its main features are:
+- Show all frames of the ID3 tag (colloquial "mp3 tags")
+- Get/Add/Edit specific frames (see Name Definitions)
+- Get/Add artworks (Support for jpeg and png. Create an issue if you need more
+  types.)
+- Remove frames or the whole tag
+- Print hex-dump of a specific frame
+- You can overwrite the input file or write to a new path
+- It is made to handle invalid tags and headers and debug them
+- Can print a detailed list of all frames with comments when they are invalid
+- Supports Unicode correctly!
+- It works from command line
+- Support for ID3v2.3.0 (most common) and ID3v2.4.0 (latest)
+- All encodings supported (ISO 8859-1, UTF-16 with BOM, UTF-16BE, UTF-8)
+- Partial support of extended header: CRC feature supported!