Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2023 11:57:59 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: cb3e99b80bc0 - main - audio/shuriken: Shuriken beat slicer
Message-ID:  <202302221157.31MBvxBD098731@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

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

commit cb3e99b80bc0bd06855f3b7ae837d67d0e93bb79
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-02-22 11:56:50 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-02-22 11:57:56 +0000

    audio/shuriken: Shuriken beat slicer
---
 audio/Makefile                                     |  1 +
 audio/shuriken/Makefile                            | 47 ++++++++++++++++++++++
 audio/shuriken/distinfo                            |  3 ++
 ...ceLibraryCode_modules_juce__core_juce__core.cpp | 13 ++++++
 ...es_juce__core_native_juce__BasicNativeHeaders.h | 38 +++++++++++++++++
 ...s_juce__core_native_juce__linux__CommonFile.cpp | 11 +++++
 ...ules_juce__core_native_juce__linux__Network.cpp | 14 +++++++
 ..._juce__core_native_juce__linux__SystemStats.cpp | 13 ++++++
 ...les_juce__core_native_juce__posix__SharedCode.h | 11 +++++
 audio/shuriken/pkg-descr                           |  5 +++
 10 files changed, 156 insertions(+)

diff --git a/audio/Makefile b/audio/Makefile
index bf084b786fae..dd46ce93873e 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -742,6 +742,7 @@
     SUBDIR += sherlock-lv2
     SUBDIR += shntool
     SUBDIR += shortwave
+    SUBDIR += shuriken
     SUBDIR += sidplay
     SUBDIR += sidplay2
     SUBDIR += sidplayer
diff --git a/audio/shuriken/Makefile b/audio/shuriken/Makefile
new file mode 100644
index 000000000000..95c25a43b50f
--- /dev/null
+++ b/audio/shuriken/Makefile
@@ -0,0 +1,47 @@
+PORTNAME=	shuriken
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.5.2-5
+DISTVERSIONSUFFIX=	-gd09afc7
+CATEGORIES=	audio
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Shuriken beat slicer
+WWW=		https://github.com/rock-hopper/shuriken
+
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	gmake:devel/gmake
+LIB_DEPENDS=	libasound.so:audio/alsa-lib \
+		libaubio.so:audio/aubio \
+		liblo.so:audio/liblo \
+		libsamplerate.so:audio/libsamplerate \
+		libsndfile.so:audio/libsndfile \
+		librubberband.so:audio/rubberband \
+		libsysinfo.so:devel/libsysinfo
+
+USES=		gl qmake qt:5 xorg
+USE_QT=		core gui opengl widgets buildtools:build linguisttools:build
+USE_GL=		gl
+USE_XORG=	x11
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	rock-hopper
+
+CXXFLAGS+=	-Dstat64=stat
+LDFLAGS+=	-lexecinfo \
+		-lsysinfo
+
+PLIST_FILES=	bin/${PORTNAME}
+
+pre-patch: # remove all .orig files
+	@${FIND} ${WRKSRC} -name "*.orig" | ${XARGS} ${RM}
+
+pre-build: # build libsndlib_shuriken
+	@${MKDIR} ${WRKSRC}/lib
+	@cd ${WRKSRC}/src/SndLibShuriken && \
+		./configure --without-audio --without-s7 && \
+		${GMAKE} && \
+		${MV} libsndlib_shuriken.a ../../lib/
+
+.include <bsd.port.mk>
diff --git a/audio/shuriken/distinfo b/audio/shuriken/distinfo
new file mode 100644
index 000000000000..253b52f717b6
--- /dev/null
+++ b/audio/shuriken/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1677017823
+SHA256 (rock-hopper-shuriken-v0.5.2-5-gd09afc7_GH0.tar.gz) = e016e926c3e0b52406f8773a88b1fad294ffa2a2d615614ae6d0c7ab2dc89d79
+SIZE (rock-hopper-shuriken-v0.5.2-5-gd09afc7_GH0.tar.gz) = 1451382
diff --git a/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_juce__core.cpp b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_juce__core.cpp
new file mode 100644
index 000000000000..0634386fb323
--- /dev/null
+++ b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_juce__core.cpp
@@ -0,0 +1,13 @@
+--- src/JuceLibraryCode/modules/juce_core/juce_core.cpp.orig	2020-02-23 16:47:36 UTC
++++ src/JuceLibraryCode/modules/juce_core/juce_core.cpp
+@@ -123,6 +123,10 @@
+  #define   JUCE_STANDALONE_APPLICATION 0
+ #endif
+ 
++#include <sys/sysinfo.h>
++
++extern char **environ;
++
+ //==============================================================================
+ namespace juce
+ {
diff --git a/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h
new file mode 100644
index 000000000000..b7c28da79ae5
--- /dev/null
+++ b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h
@@ -0,0 +1,38 @@
+--- src/JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h.orig	2023-02-22 01:49:53 UTC
++++ src/JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h
+@@ -43,7 +43,7 @@
+  #else
+   #import <Cocoa/Cocoa.h>
+   #import <CoreAudio/HostTime.h>
+-  #include <sys/dir.h>
++  //#include <sys/dir.h>
+  #endif
+ 
+  #include <sys/socket.h>
+@@ -172,9 +172,9 @@
+  #include <sys/time.h>
+  #include <errno.h>
+  #include <sys/stat.h>
+- #include <sys/dir.h>
++ //#include <sys/dir.h>
+  #include <sys/ptrace.h>
+- #include <sys/vfs.h>
++ //#include <sys/vfs.h>
+  #include <sys/wait.h>
+  #include <sys/mman.h>
+  #include <fnmatch.h>
+@@ -191,9 +191,13 @@
+  #include <net/if.h>
+  #include <sys/sysinfo.h>
+  #include <sys/file.h>
+- #include <sys/prctl.h>
++ //#include <sys/prctl.h>
+  #include <signal.h>
+  #include <stddef.h>
++
++ #include <sys/param.h>
++ #include <sys/mount.h>
++
+ 
+ //==============================================================================
+ #elif JUCE_ANDROID
diff --git a/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__CommonFile.cpp b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__CommonFile.cpp
new file mode 100644
index 000000000000..b54c99cf035e
--- /dev/null
+++ b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__CommonFile.cpp
@@ -0,0 +1,11 @@
+--- src/JuceLibraryCode/modules/juce_core/native/juce_linux_CommonFile.cpp.orig	2023-02-22 02:02:45 UTC
++++ src/JuceLibraryCode/modules/juce_core/native/juce_linux_CommonFile.cpp
+@@ -26,6 +26,8 @@
+   ==============================================================================
+ */
+ 
++#include <dirent.h>
++
+ bool File::copyInternal (const File& dest) const
+ {
+     FileInputStream in (*this);
diff --git a/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__Network.cpp b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__Network.cpp
new file mode 100644
index 000000000000..05537dbc65e4
--- /dev/null
+++ b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__Network.cpp
@@ -0,0 +1,14 @@
+--- src/JuceLibraryCode/modules/juce_core/native/juce_linux_Network.cpp.orig	2023-02-22 04:30:10 UTC
++++ src/JuceLibraryCode/modules/juce_core/native/juce_linux_Network.cpp
+@@ -41,9 +41,9 @@ void MACAddress::findAllAddresses (Array<MACAddress>& 
+                 strcpy (ifr.ifr_name, i->ifa_name);
+                 ifr.ifr_addr.sa_family = AF_INET;
+ 
+-                if (ioctl (s, SIOCGIFHWADDR, &ifr) == 0)
++                if (ioctl (s, SIOCGIFCONF, &ifr) == 0)
+                 {
+-                    MACAddress ma ((const uint8*) ifr.ifr_hwaddr.sa_data);
++                    MACAddress ma ((const uint8*) ifr.ifr_data);
+ 
+                     if (! ma.isNull())
+                         result.addIfNotAlreadyThere (ma);
diff --git a/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__SystemStats.cpp b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__SystemStats.cpp
new file mode 100644
index 000000000000..48b6e8340fcc
--- /dev/null
+++ b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__linux__SystemStats.cpp
@@ -0,0 +1,13 @@
+--- src/JuceLibraryCode/modules/juce_core/native/juce_linux_SystemStats.cpp.orig	2023-02-22 04:43:54 UTC
++++ src/JuceLibraryCode/modules/juce_core/native/juce_linux_SystemStats.cpp
+@@ -142,8 +142,8 @@ static String getLocaleValue (nl_item key)
+     return result;
+ }
+ 
+-String SystemStats::getUserLanguage()    { return getLocaleValue (_NL_IDENTIFICATION_LANGUAGE); }
+-String SystemStats::getUserRegion()      { return getLocaleValue (_NL_IDENTIFICATION_TERRITORY); }
++String SystemStats::getUserLanguage()    { return String(); }
++String SystemStats::getUserRegion()      { return String(); }
+ String SystemStats::getDisplayLanguage() { return getUserLanguage() + "-" + getUserRegion(); }
+ 
+ //==============================================================================
diff --git a/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__posix__SharedCode.h b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__posix__SharedCode.h
new file mode 100644
index 000000000000..bb6f002a0db0
--- /dev/null
+++ b/audio/shuriken/files/patch-src_JuceLibraryCode_modules_juce__core_native_juce__posix__SharedCode.h
@@ -0,0 +1,11 @@
+--- src/JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h.orig	2023-02-22 01:59:09 UTC
++++ src/JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h
+@@ -963,7 +963,7 @@ void JUCE_CALLTYPE Thread::setCurrentThreadName (const
+         [[NSThread currentThread] setName: juceStringToNS (name)];
+     }
+    #elif JUCE_LINUX
+-    #if (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
++    #if (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012 || defined(__FreeBSD__)
+      pthread_setname_np (pthread_self(), name.toRawUTF8());
+     #else
+      prctl (PR_SET_NAME, name.toRawUTF8(), 0, 0, 0);
diff --git a/audio/shuriken/pkg-descr b/audio/shuriken/pkg-descr
new file mode 100644
index 000000000000..9581777f282b
--- /dev/null
+++ b/audio/shuriken/pkg-descr
@@ -0,0 +1,5 @@
+Shuriken is an open source beat slicer for Linux which harnesses the power of
+aubio's onset detection algorithms and Rubber Band's time stretching
+capabilities. A simple Qt interface makes it easy to slice up drum loops, assign
+individual drum hits to MIDI keys, and change the tempo of loops in real-time.
+The JUCE library takes care of handling audio and MIDI behind the scenes.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302221157.31MBvxBD098731>