From nobody Tue Jun 25 09:26:14 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7fbB5q6pz5P90Y; Tue, 25 Jun 2024 09:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7fbB2bsNz4KNs; Tue, 25 Jun 2024 09:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AedExx1usz5Q7PsRdDf3PKyFyHFDVkfyY1niFzaK8dQ=; b=IPUDdws8ZmqolfgzMphiFagm60rPfDpkKEKSwmFZfbYRyTNXngpNXDmZzj43Z0qse/pNSm YactcqaDCsqRotKfX7M4SY3ab4gJfWg/AFC82RPULw+OsIJUbAct8N40NG9p1E+ATaPfRq u6jylWobNOvWpik3pXCloOKJUJPMSRTtSpfw1bLT2QjEWF3xmE4ZAJg0xBlJfpoqkLbaJH pgtnFAoKmurMBEfHq7E/MOf5tO5s9mfnYrAG5LzJwnWvInIPREbti3JVjcm/+ns4mdAuGt /RXYxbgA11zxFA/E4PjvUnHqCXPu7He7RYVWh5o8OSbV7SqcAvQa+vyDmoDS4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719307574; a=rsa-sha256; cv=none; b=FydSDe0mcNTPn+qmbAuMFVBmSsbNz1jAdh/Uy8uo4YwZGAdy89wy9dDTAn+Hya7Q9/wURb KNLREFcaIM5GvdHU1WN+zlowoYBByiFuzfhomPkbZK2y3lEBLWFT53TDHrJP2GbbuNrqht jCL0CXL9619DzswaHLmg2R8DclNYqsCE3hNvc4Ns7W/AQjcX9DtPFr+FY5pVNZSgU7XRWF QqHsgxYeZptFSvaRchp2ghQUXmublYe9UTDcO870UCcTywBlvMb9++RQzNcpCBg/VG/yO4 O8lCpuMoE9G4Dongsj3P4t5hVN2DlR9JPsdAOORw+KUwgJl6wrn9XtSL9m3o+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719307574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AedExx1usz5Q7PsRdDf3PKyFyHFDVkfyY1niFzaK8dQ=; b=tyKyhy3+7EqdWyLNCvIueaTbcA1zHdi4SrkPSuJpIWkZkrojbnOuz0A8wZDQ2EAbE72BkR Lia+UsJ3WMErdAeYLun5yrRNkiI4FAFkfAjrPeFbvYmsxmZ+TaSkRhRbcQygzIX5zXCRvS uYqAXrL0K4507MXgHuQ4QckAtsboKB8t/pLWs13fMAVqo8fSMZL0UqL6OGlqf75/FQlJxW V+yRwdpSyS5gZ9oJBiP1GDvSHcAmOl+T6/sAi/FOHvTq5/kXJQHMjo5yNc1Cj6hZ8W52RG K8XZMzftYgbzpKVUpDV7hVMZke4LOVtlXxNb2qJ9RQdOpbVsP6RaVC+irA0Zmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7fbB2Cd4zwPQ; Tue, 25 Jun 2024 09:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45P9QE3S094461; Tue, 25 Jun 2024 09:26:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9QEq6094458; Tue, 25 Jun 2024 09:26:14 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:26:14 GMT Message-Id: <202406250926.45P9QEq6094458@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 87fb42bf34ef - main - audio/xwax: New port: Open-source vinyl emulation software List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87fb42bf34ef1709b6cec889e40af2af69900a0d Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=87fb42bf34ef1709b6cec889e40af2af69900a0d commit 87fb42bf34ef1709b6cec889e40af2af69900a0d Author: Yuri Victorovich AuthorDate: 2024-06-25 08:54:09 +0000 Commit: Yuri Victorovich CommitDate: 2024-06-25 09:26:07 +0000 audio/xwax: New port: Open-source vinyl emulation software --- audio/Makefile | 1 + audio/xwax/Makefile | 39 ++++++++++++++++++++++++++++++++++++++ audio/xwax/distinfo | 3 +++ audio/xwax/files/patch-Makefile | 23 ++++++++++++++++++++++ audio/xwax/files/patch-excrate.c | 10 ++++++++++ audio/xwax/files/patch-interface.c | 34 +++++++++++++++++++++++++++++++++ audio/xwax/files/patch-library.c | 31 ++++++++++++++++++++++++++++++ audio/xwax/files/patch-track.c | 10 ++++++++++ audio/xwax/pkg-descr | 1 + 9 files changed, 152 insertions(+) diff --git a/audio/Makefile b/audio/Makefile index 75013e342992..9246dc455a42 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -889,6 +889,7 @@ SUBDIR += xsynth-dssi SUBDIR += xuidesigner SUBDIR += xwave + SUBDIR += xwax SUBDIR += yell SUBDIR += ympd SUBDIR += yoshimi diff --git a/audio/xwax/Makefile b/audio/xwax/Makefile new file mode 100644 index 000000000000..713d225c7396 --- /dev/null +++ b/audio/xwax/Makefile @@ -0,0 +1,39 @@ +PORTNAME= xwax +DISTVERSION= 1.9 +CATEGORIES= audio +MASTER_SITES= https://www.xwax.co.uk/releases/ + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Open-source vinyl emulation software +WWW= https://wiki.xwax.org/ + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= libjack.so:audio/jack +RUN_DEPENDS= bash:shells/bash \ + ${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf:x11-fonts/dejavu + +USES= compiler:c++11-lang gmake iconv localbase:ldflags sdl shebangfix +USE_SDL= sdl ttf + +SHEBANG_FILES= scan + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-jack \ + --enable-oss + +LDFLAGS+= -liconv -lm + +PLIST_FILES= bin/xwax \ + libexec/xwax-import \ + libexec/xwax-scan \ + share/man/man1/xwax.1.gz + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/|${LOCALBASE}/|' ${WRKSRC}/interface.c + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xwax + +.include diff --git a/audio/xwax/distinfo b/audio/xwax/distinfo new file mode 100644 index 000000000000..d6aa3c2f402f --- /dev/null +++ b/audio/xwax/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1719277040 +SHA256 (xwax-1.9.tar.gz) = 9bed8fa143182818650361f49257755bf891f143161066aaa7bca8c6cce9f632 +SIZE (xwax-1.9.tar.gz) = 87599 diff --git a/audio/xwax/files/patch-Makefile b/audio/xwax/files/patch-Makefile new file mode 100644 index 000000000000..3efb05915114 --- /dev/null +++ b/audio/xwax/files/patch-Makefile @@ -0,0 +1,23 @@ +--- Makefile.orig 2024-06-25 02:10:13 UTC ++++ Makefile +@@ -137,13 +137,13 @@ install: + + .PHONY: install + install: +- $(INSTALL) -D xwax $(DESTDIR)$(BINDIR)/xwax +- $(INSTALL) -D scan $(DESTDIR)$(EXECDIR)/xwax-scan +- $(INSTALL) -D import $(DESTDIR)$(EXECDIR)/xwax-import +- $(INSTALL) -D -m 0644 xwax.1 $(DESTDIR)$(MANDIR)/man1/xwax.1 +- $(INSTALL) -D -m 0644 CHANGES $(DESTDIR)$(DOCDIR)/xwax/CHANGES +- $(INSTALL) -D -m 0644 COPYING $(DESTDIR)$(DOCDIR)/xwax/COPYING +- $(INSTALL) -D -m 0644 README $(DESTDIR)$(DOCDIR)/xwax/README ++ $(INSTALL) xwax $(DESTDIR)$(BINDIR)/xwax ++ $(INSTALL) scan $(DESTDIR)$(EXECDIR)/xwax-scan ++ $(INSTALL) import $(DESTDIR)$(EXECDIR)/xwax-import ++ $(INSTALL) -m 0644 xwax.1 $(DESTDIR)$(MANDIR)/man1/xwax.1 ++ #$(INSTALL) -m 0644 CHANGES $(DESTDIR)$(DOCDIR)/xwax/CHANGES ++ #$(INSTALL) -m 0644 COPYING $(DESTDIR)$(DOCDIR)/xwax/COPYING ++ #$(INSTALL) -m 0644 README $(DESTDIR)$(DOCDIR)/xwax/README + + # Distribution archive from Git source code + diff --git a/audio/xwax/files/patch-excrate.c b/audio/xwax/files/patch-excrate.c new file mode 100644 index 000000000000..548ddc56ceca --- /dev/null +++ b/audio/xwax/files/patch-excrate.c @@ -0,0 +1,10 @@ +--- excrate.c.orig 2024-06-25 01:52:31 UTC ++++ excrate.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + + #include "debug.h" diff --git a/audio/xwax/files/patch-interface.c b/audio/xwax/files/patch-interface.c new file mode 100644 index 000000000000..6ad03dd92504 --- /dev/null +++ b/audio/xwax/files/patch-interface.c @@ -0,0 +1,34 @@ +--- interface.c.orig 2023-05-12 17:27:59 UTC ++++ interface.c +@@ -414,11 +414,12 @@ static int do_draw_text(SDL_Surface *sf, const struct + src.h = 0; + + } else { ++ char *in = NULL; + if (!locale) { + rendered = TTF_RenderText_Shaded(font, buf, fg, bg); + } else { + char ubuf[256], /* fixed buffer is reasonable for rendering */ +- *in, *out; ++ *out; + size_t len, fill; + + out = ubuf; +@@ -427,7 +428,7 @@ static int do_draw_text(SDL_Surface *sf, const struct + if (iconv(utf, NULL, NULL, &out, &fill) == -1) + abort(); + +- in = strdupa(buf); ++ in = strdup(buf); + len = strlen(in); + + (void)iconv(utf, &in, &len, &out, &fill); +@@ -446,6 +447,8 @@ static int do_draw_text(SDL_Surface *sf, const struct + + SDL_BlitSurface(rendered, &src, sf, &dst); + SDL_FreeSurface(rendered); ++ ++ //free(in); // this crashes with free() enabled for unknown reason, it's better to just lose the memory here + } + + /* Complete the remaining space with a blank rectangle */ diff --git a/audio/xwax/files/patch-library.c b/audio/xwax/files/patch-library.c new file mode 100644 index 000000000000..ddd573314804 --- /dev/null +++ b/audio/xwax/files/patch-library.c @@ -0,0 +1,31 @@ +--- library.c.orig 2024-06-25 01:59:59 UTC ++++ library.c +@@ -603,12 +603,13 @@ int library_import(struct library *li, const char *sca + char *cratename, *pathname; + struct crate *crate; + +- pathname = strdupa(path); ++ pathname = strdup(path); + cratename = basename(pathname); /* POSIX version, see basename(3) */ + assert(cratename != NULL); + + crate = malloc(sizeof *crate); + if (crate == NULL) { ++ free(pathname); + perror("malloc"); + return -1; + } +@@ -619,11 +620,13 @@ int library_import(struct library *li, const char *sca + if (add_crate(li, crate) == -1) + goto fail_crate; + ++ free(pathname); + return 0; + + fail_crate: + crate_clear(crate); + fail: ++ free(pathname); + free(crate); + return -1; + diff --git a/audio/xwax/files/patch-track.c b/audio/xwax/files/patch-track.c new file mode 100644 index 000000000000..b65a7ba4a76d --- /dev/null +++ b/audio/xwax/files/patch-track.c @@ -0,0 +1,10 @@ +--- track.c.orig 2024-06-25 02:02:16 UTC ++++ track.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include /* mlock() */ + diff --git a/audio/xwax/pkg-descr b/audio/xwax/pkg-descr new file mode 100644 index 000000000000..08eed90ea22e --- /dev/null +++ b/audio/xwax/pkg-descr @@ -0,0 +1 @@ +xwax is an open source vinyl emulation software project.