svn commit: r453956 - in head/audio: . drumstick drumstick/files

Yuri Victorovich yuri at FreeBSD.org
Sat Nov 11 08:01:18 UTC 2017


Author: yuri
Date: Sat Nov 11 08:01:16 2017
New Revision: 453956
URL: https://svnweb.freebsd.org/changeset/ports/453956

Log:
  New port: audio/drumstick: MIDI libraries for Qt5/C++
  
  PR:		221459
  Approved by:	tcberner (mentor)
  Differential Revision:	https://reviews.freebsd.org/D12999

Added:
  head/audio/drumstick/
  head/audio/drumstick/Makefile   (contents, props changed)
  head/audio/drumstick/distinfo   (contents, props changed)
  head/audio/drumstick/files/
  head/audio/drumstick/files/patch-CMakeLists.txt   (contents, props changed)
  head/audio/drumstick/files/patch-library_include_drumstickcommon.h   (contents, props changed)
  head/audio/drumstick/files/patch-library_rt-backends_CMakeLists.txt   (contents, props changed)
  head/audio/drumstick/files/patch-library_rt-backends_eassynth_src_synthrenderer.cpp   (contents, props changed)
  head/audio/drumstick/files/patch-library_rt_backendmanager.cpp   (contents, props changed)
  head/audio/drumstick/pkg-descr   (contents, props changed)
  head/audio/drumstick/pkg-plist   (contents, props changed)
Modified:
  head/audio/Makefile

Modified: head/audio/Makefile
==============================================================================
--- head/audio/Makefile	Sat Nov 11 07:31:58 2017	(r453955)
+++ head/audio/Makefile	Sat Nov 11 08:01:16 2017	(r453956)
@@ -114,6 +114,7 @@
     SUBDIR += dream
     SUBDIR += drumgizmo
     SUBDIR += drumpiler
+    SUBDIR += drumstick
     SUBDIR += dsbmixer
     SUBDIR += dssi
     SUBDIR += dtmfdial

Added: head/audio/drumstick/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/Makefile	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+PORTNAME=	drumstick
+DISTVERSION=	1.1.0
+CATEGORIES=	audio multimedia
+MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}/
+
+MAINTAINER=	yuri at FreeBSD.org
+COMMENT=	MIDI libraries for Qt5/C++
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	libfluidsynth.so:audio/fluidsynth
+RUN_DEPENDS=	${LOCALBASE}/share/sounds/sf2/FluidR3_GM.sf2:audio/fluid-soundfont
+
+USES=		cmake:outsource pkgconfig shared-mime-info tar:bz2
+USE_QT5=	core gui network svg testlib widgets buildtools_build qmake_build
+USE_LDCONFIG=	yes
+
+OPTIONS_DEFINE=		PULSEAUDIO MANPAGES
+OPTIONS_DEFAULT=	PULSEAUDIO
+OPTIONS_SUB=		yes
+PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
+PULSEAUDIO_CMAKE_BOOL=	USE_PULSEAUDIO
+MANPAGES_BUILD_DEPENDS=	xsltproc:textproc/libxslt \
+			docbook-xsl>0:textproc/docbook-xsl
+MANPAGES_CMAKE_BOOL=	BUILD_DOCS
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|"default.sf2"|"${LOCALBASE}/share/sounds/sf2/FluidR3_GM.sf2"|' \
+		${WRKSRC}/utils/vpiano/fluidsettingsdialog.cpp \
+		${WRKSRC}/library/rt-backends/synth/synthengine.cpp
+	@${REINPLACE_CMD} -e 's|"$${CMAKE_INSTALL_DATAROOTDIR}/man/man1"|"${PREFIX}/man/man1"|' \
+		${WRKSRC}/cmake_admin/CreateManpages.cmake
+
+.include <bsd.port.mk>

Added: head/audio/drumstick/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/distinfo	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1510117698
+SHA256 (drumstick-1.1.0.tar.bz2) = ae1d2c0d21b45d144e181b873ffbc2979a294fab31b8d71a5b0b8cad3276f38e
+SIZE (drumstick-1.1.0.tar.bz2) = 1012405

Added: head/audio/drumstick/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/files/patch-CMakeLists.txt	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,87 @@
+--- CMakeLists.txt.orig	2016-09-24 21:08:24 UTC
++++ CMakeLists.txt
+@@ -24,7 +24,7 @@ endif()
+ project(DRUMSTICK)
+ 
+ if(CMAKE_SIZEOF_VOID_P MATCHES "8")
+-    set(_INIT_LIB_SUFFIX "64")
++    set(_INIT_LIB_SUFFIX "")
+ else()
+     set(_INIT_LIB_SUFFIX "")
+ endif()
+@@ -65,13 +65,13 @@ add_definitions(-DVERSION=${VERSION})
+ message(STATUS "drumstick ${VERSION} prefix: ${CMAKE_INSTALL_PREFIX}")
+ 
+ set(_DBUS_INIT OFF)
+-if(${CMAKE_SYSTEM} MATCHES "Linux")
++if(${CMAKE_SYSTEM} MATCHES "Linux|FreeBSD")
+ 	set(_DBUS_INIT ON)
+ endif()
+ 
+ # User options
+ option(STATIC_DRUMSTICK "Build static libraries instead of dynamic" OFF)
+-option(USE_DBUS "Include DBus support (required for RealtimeKit)" ${_DBUS_INIT})
++#option(USE_DBUS "Include DBus support (required for RealtimeKit)" ${_DBUS_INIT})
+ 
+ message(STATUS "Build configuration: ${CMAKE_BUILD_TYPE}")
+ 
+@@ -99,8 +99,8 @@ else()
+     message(FATAL_ERROR "Program pkg-config not found")
+ endif()
+ 
+-if(${CMAKE_SYSTEM} MATCHES "Linux")
+-    pkg_check_modules(ALSA alsa>=1.0.0)
++if(${CMAKE_SYSTEM} MATCHES "Linux|FreeBSD")
++    #pkg_check_modules(ALSA alsa>=1.0.0)
+     if(ALSA_FOUND)
+         set(ALSA_LIBS ${ALSA_LIBRARIES})
+         list(APPEND ALSA_LIB_DIR ${ALSA_LIBRARY_DIRS} ${ALSA_LIBDIR})
+@@ -108,7 +108,9 @@ if(${CMAKE_SYSTEM} MATCHES "Linux")
+     else()
+         message(STATUS "Warning: ALSA library not found.")
+     endif()
+-    pkg_check_modules(PULSE libpulse-simple)
++    if (USE_PULSEAUDIO)
++      pkg_check_modules(PULSE libpulse-simple)
++    endif()
+     if(NOT PULSE_FOUND)
+         message(STATUS "Warning: PulseAudio library not found.")
+     endif()
+@@ -128,7 +130,7 @@ if(BUILD_TESTING)
+   add_subdirectory(tests)
+ endif()
+ 
+-if(${CMAKE_SYSTEM} MATCHES "Linux")
++if(${CMAKE_SYSTEM} MATCHES "Linux|FreeBSD")
+     find_package(Doxygen)
+     if(DOXYGEN_FOUND)
+         configure_file(
+@@ -139,12 +141,14 @@ if(${CMAKE_SYSTEM} MATCHES "Linux")
+             ${DOXYGEN} Doxyfile
+             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+     endif()
+-    add_subdirectory(doc)
+-    configure_file(drumstick-alsa.pc.in drumstick-alsa.pc IMMEDIATE @ONLY)
++    if (BUILD_DOCS)
++      add_subdirectory(doc)
++    endif()
++    #configure_file(drumstick-alsa.pc.in drumstick-alsa.pc IMMEDIATE @ONLY)
+     configure_file(drumstick.spec.in drumstick.spec IMMEDIATE @ONLY)
+-    install(FILES
+-	${CMAKE_CURRENT_BINARY_DIR}/drumstick-alsa.pc
+-	DESTINATION lib${LIB_SUFFIX}/pkgconfig )
++    #install(FILES
++    #	${CMAKE_CURRENT_BINARY_DIR}/drumstick-alsa.pc
++    #	DESTINATION lib${LIB_SUFFIX}/pkgconfig )
+     # XML mime types
+     set( SHARED_MIME_INFO_MINIMUM_VERSION "0.30" )
+     set( XDG_MIME_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages" )
+@@ -174,7 +178,7 @@ configure_file(
+ add_custom_target( uninstall
+     "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+ 
+-if(${CMAKE_SYSTEM} MATCHES "Linux")
++if(${CMAKE_SYSTEM} MATCHES "Linux|FreeBSD")
+     # tarball target
+     add_custom_target( tarball
+         COMMAND mkdir -p drumstick-${VERSION}

Added: head/audio/drumstick/files/patch-library_include_drumstickcommon.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/files/patch-library_include_drumstickcommon.h	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,48 @@
+--- library/include/drumstickcommon.h.orig	2016-09-24 21:08:23 UTC
++++ library/include/drumstickcommon.h
+@@ -27,7 +27,8 @@
+ #include <QtDebug>
+ 
+ extern "C" {
+-#include <alsa/asoundlib.h>
++// ALSA isn't disabled cleanly, see https://sourceforge.net/p/drumstick/bugs/9
++//#include <alsa/asoundlib.h>
+ }
+ 
+ /**
+@@ -73,7 +74,7 @@ public:
+      */
+     const QString qstrError() const 
+     {
+-        return QString(snd_strerror(m_errCode));
++        return QString((m_errCode));
+     }
+ 
+     /**
+@@ -110,7 +111,7 @@ private:
+ inline int checkErrorAndThrow(int rc, const char *where)
+ {
+     if (rc < 0) {
+-        qDebug() << "Error code:" << rc << "(" <<  snd_strerror(rc) << ")";
++        qDebug() << "Error code:" << rc << "(" <<  (rc) << ")";
+         qDebug() << "Location:" << where;
+         throw SequencerError(QString(where), rc);
+     }
+@@ -127,7 +128,7 @@ inline int checkErrorAndThrow(int rc, co
+ inline int checkWarning(int rc, const char *where)
+ {
+     if (rc < 0) {
+-        qWarning() << "Exception code:" << rc << "(" <<  snd_strerror(rc) << ")";
++        qWarning() << "Exception code:" << rc << "(" <<  (rc) << ")";
+         qWarning() << "Location:" << where;
+     }
+     return rc;
+@@ -152,7 +153,7 @@ inline int checkWarning(int rc, const ch
+  * different to the runtime library.
+  * @see getRuntimeALSALibraryVersion
+  */
+-const QString LIBRARY_VERSION(SND_LIB_VERSION_STR);
++const QString LIBRARY_VERSION("???");
+ 
+ } /* namespace drumstick */
+ 

Added: head/audio/drumstick/files/patch-library_rt-backends_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/files/patch-library_rt-backends_CMakeLists.txt	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,11 @@
+--- library/rt-backends/CMakeLists.txt.orig	2016-09-24 21:08:23 UTC
++++ library/rt-backends/CMakeLists.txt
+@@ -19,7 +19,7 @@
+ #add_subdirectory(dummy-in)
+ #add_subdirectory(dummy-out)
+ 
+-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
++if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD")
+ if(ALSA_FOUND)
+     add_subdirectory(alsa-in)
+     add_subdirectory(alsa-out)

Added: head/audio/drumstick/files/patch-library_rt-backends_eassynth_src_synthrenderer.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/files/patch-library_rt-backends_eassynth_src_synthrenderer.cpp	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,10 @@
+--- library/rt-backends/eassynth/src/synthrenderer.cpp.orig	2016-09-24 21:08:23 UTC
++++ library/rt-backends/eassynth/src/synthrenderer.cpp
+@@ -29,6 +29,7 @@
+ #include <pulse/simple.h>
+ #include "synthrenderer.h"
+ #include "drumstickcommon.h"
++#include <assert.h>
+ 
+ namespace drumstick {
+ namespace rt {

Added: head/audio/drumstick/files/patch-library_rt_backendmanager.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/files/patch-library_rt_backendmanager.cpp	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,11 @@
+--- library/rt/backendmanager.cpp.orig	2016-09-24 21:08:23 UTC
++++ library/rt/backendmanager.cpp
+@@ -140,7 +140,7 @@ namespace rt {
+         d->appendDir( appPath + QStringLiteral("../PlugIns/") + QSTR_DRUMSTICK, result );
+     #endif // Linux, Unix...
+         QStringList libs;
+-        libs << "../lib/" << "../lib32/" << "../lib64/";
++        libs << "../lib/";
+         foreach(const QString& lib, libs) {
+             d->appendDir( appPath + lib + QSTR_DRUMSTICK, result );
+         }

Added: head/audio/drumstick/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/pkg-descr	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,7 @@
+Drumstick is a tool to play music. This is a set of C++ MIDI libraries using
+Qt5 objects, idioms and style. It contains a C++ wrapper around software
+support for MIDI. A complementary library provides classes for SMF
+(Standard MIDI files: .MID/.KAR), Cakewalk (.WRK), and Overture (.OVE) file
+formats processing. A multiplatform realtime MIDI I/O library is also provided.
+
+WWW: https://sourceforge.net/projects/drumstick

Added: head/audio/drumstick/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/drumstick/pkg-plist	Sat Nov 11 08:01:16 2017	(r453956)
@@ -0,0 +1,42 @@
+bin/drumstick-dumpove
+bin/drumstick-dumpsmf
+bin/drumstick-dumpwrk
+bin/drumstick-vpiano
+include/drumstick/backendmanager.h
+include/drumstick/macros.h
+include/drumstick/qove.h
+include/drumstick/qsmf.h
+include/drumstick/qwrk.h
+include/drumstick/rtmidiinput.h
+include/drumstick/rtmidioutput.h
+lib/drumstick/libdrumstick-rt-net-in.so
+lib/drumstick/libdrumstick-rt-net-out.so
+lib/drumstick/libdrumstick-rt-oss-in.so
+lib/drumstick/libdrumstick-rt-oss-out.so
+lib/drumstick/libdrumstick-rt-synth.so
+%%PULSEAUDIO%%lib/drumstick/libdrumstick-rt-eassynth.so
+lib/libdrumstick-file.so
+lib/libdrumstick-file.so.1
+lib/libdrumstick-file.so.1.1.0
+lib/libdrumstick-rt.so
+lib/libdrumstick-rt.so.1
+lib/libdrumstick-rt.so.1.1.0
+libdata/pkgconfig/drumstick-file.pc
+libdata/pkgconfig/drumstick-rt.pc
+share/applications/drumstick-vpiano.desktop
+share/icons/hicolor/16x16/apps/drumstick.png
+share/icons/hicolor/32x32/apps/drumstick.png
+share/icons/hicolor/48x48/apps/drumstick.png
+share/icons/hicolor/64x64/apps/drumstick.png
+share/icons/hicolor/scalable/apps/drumstick.svgz
+%%MANPAGES%%man/man1/drumstick-drumgrid.1.gz
+%%MANPAGES%%man/man1/drumstick-dumpmid.1.gz
+%%MANPAGES%%man/man1/drumstick-dumpove.1.gz
+%%MANPAGES%%man/man1/drumstick-dumpsmf.1.gz
+%%MANPAGES%%man/man1/drumstick-dumpwrk.1.gz
+%%MANPAGES%%man/man1/drumstick-guiplayer.1.gz
+%%MANPAGES%%man/man1/drumstick-metronome.1.gz
+%%MANPAGES%%man/man1/drumstick-playsmf.1.gz
+%%MANPAGES%%man/man1/drumstick-sysinfo.1.gz
+%%MANPAGES%%man/man1/drumstick-vpiano.1.gz
+share/mime/packages/drumstick.xml


More information about the svn-ports-all mailing list