git: 9ddb0f9d1998 - main - audio/timbre-mill: New port: Timbre Mill tool for timbre correction

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 05 Aug 2022 07:48:09 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9ddb0f9d199823950e04d2d2c8b30abee2c51c70

commit 9ddb0f9d199823950e04d2d2c8b30abee2c51c70
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-05 07:47:22 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-05 07:48:04 +0000

    audio/timbre-mill: New port: Timbre Mill tool for timbre correction
---
 audio/Makefile                             |  1 +
 audio/timbre-mill/Makefile                 | 36 ++++++++++++++++++++++++++++++
 audio/timbre-mill/distinfo                 |  3 +++
 audio/timbre-mill/files/patch-src_Makefile | 11 +++++++++
 audio/timbre-mill/pkg-descr                | 13 +++++++++++
 5 files changed, 64 insertions(+)

diff --git a/audio/Makefile b/audio/Makefile
index 6304bb8d72f8..fa22ed06def7 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -795,6 +795,7 @@
     SUBDIR += tetraproc
     SUBDIR += thunar-media-tags-plugin
     SUBDIR += tiatracker
+    SUBDIR += timbre-mill
     SUBDIR += timely-lv2
     SUBDIR += timemachine
     SUBDIR += timidity
diff --git a/audio/timbre-mill/Makefile b/audio/timbre-mill/Makefile
new file mode 100644
index 000000000000..efe0b5fe8fdc
--- /dev/null
+++ b/audio/timbre-mill/Makefile
@@ -0,0 +1,36 @@
+PORTNAME=	timbre-mill
+DISTVERSION=	0.5.6
+CATEGORIES=	audio
+MASTER_SITES=	https://github.com/sadko4u/timbre-mill/releases/download/${DISTVERSION}/
+DISTNAME=	${PORTNAME}-src-${DISTVERSION}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Timbre Mill tool for timbre correction
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	libiconv.so:converters/libiconv \
+		libsndfile.so:audio/libsndfile # for some reason binaries aren't linked with shared libs
+
+USES=		gmake iconv localbase:ldflags pkgconfig
+
+WRKSRC=		${WRKDIR}/${PORTNAME}
+
+BINARY_ALIAS=	make=${GMAKE} \
+		g++=${CXX}
+
+PLIST_FILES=	bin/${PORTNAME}
+
+pre-configure:
+	 @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} config
+
+post-install:
+	# remove redundant symlink
+	@cd ${STAGEDIR}${PREFIX}/bin && \
+		${RM} ${PORTNAME} && \
+		${MV} ${PORTNAME}-${DISTVERSION} ${PORTNAME}
+	# strip binary
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/audio/timbre-mill/distinfo b/audio/timbre-mill/distinfo
new file mode 100644
index 000000000000..14946ec46c9a
--- /dev/null
+++ b/audio/timbre-mill/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1659684391
+SHA256 (timbre-mill-src-0.5.6.tar.gz) = fe4ccafede8a4ddb875de17d3b4bb9681f578eed507ca01760fa7cec92c2e700
+SIZE (timbre-mill-src-0.5.6.tar.gz) = 2099087
diff --git a/audio/timbre-mill/files/patch-src_Makefile b/audio/timbre-mill/files/patch-src_Makefile
new file mode 100644
index 000000000000..c2e9e0164f59
--- /dev/null
+++ b/audio/timbre-mill/files/patch-src_Makefile
@@ -0,0 +1,11 @@
+--- src/Makefile.orig	2022-08-05 06:57:09 UTC
++++ src/Makefile
+@@ -156,7 +156,7 @@ $(ARTIFACT_TEST_BIN): $(ARTIFACT_DEPS) $(ARTIFACT_OBJ)
+ install: all
+ 	echo "Installing $($(ARTIFACT_ID)_NAME)"
+ 	mkdir -p "$(DESTDIR)$(BINDIR)"
+-	cp $(ARTIFACT_EXE) -t "$(DESTDIR)$(BINDIR)"
++	cp $(ARTIFACT_EXE) "$(DESTDIR)$(BINDIR)"
+ 	ln -sf $(notdir $(ARTIFACT_EXE)) "$(DESTDIR)$(BINDIR)/$(ARTIFACT_EXELINK)"
+ 	echo "Install OK"
+ 
diff --git a/audio/timbre-mill/pkg-descr b/audio/timbre-mill/pkg-descr
new file mode 100644
index 000000000000..a5de66d6d99f
--- /dev/null
+++ b/audio/timbre-mill/pkg-descr
@@ -0,0 +1,13 @@
+Timbre Mill is a tool for timbral correction of audio files.
+
+The tool allows to specify multiple file groups containing two type of files:
+* master file;
+* child files.
+
+For each file group, the tool performs spectral analysis of master file and each
+child file. After that, it computes the raw inverse impulse responses which
+allow to tune tonal characteristics of the master file to match the tonal
+characteristics of each corresponding child file. These raw IR files allow to
+process audio data as linear-phase finite impulse response filters (FIRs).
+
+WWW: https://github.com/sadko4u/timbre-mill