[Midnightbsd-cvs] mports [15652] trunk/audio: add kmix port

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Dec 4 21:47:37 EST 2013


Revision: 15652
          http://svnweb.midnightbsd.org/mports/?rev=15652
Author:   laffer1
Date:     2013-12-04 21:47:36 -0500 (Wed, 04 Dec 2013)
Log Message:
-----------
add kmix port

Modified Paths:
--------------
    trunk/audio/Makefile

Added Paths:
-----------
    trunk/audio/kmix/
    trunk/audio/kmix/Makefile
    trunk/audio/kmix/distinfo
    trunk/audio/kmix/files/
    trunk/audio/kmix/files/extrapatch-no_alsa
    trunk/audio/kmix/files/patch-libcxx
    trunk/audio/kmix/pkg-descr
    trunk/audio/kmix/pkg-plist

Modified: trunk/audio/Makefile
===================================================================
--- trunk/audio/Makefile	2013-12-04 05:36:19 UTC (rev 15651)
+++ trunk/audio/Makefile	2013-12-05 02:47:36 UTC (rev 15652)
@@ -45,6 +45,7 @@
 SUBDIR += jack
 SUBDIR += juk
 SUBDIR += kio-audiocd
+SUBDIR += kmix
 SUBDIR += ladspa
 SUBDIR += lame
 SUBDIR += lash

Added: trunk/audio/kmix/Makefile
===================================================================
--- trunk/audio/kmix/Makefile	                        (rev 0)
+++ trunk/audio/kmix/Makefile	2013-12-05 02:47:36 UTC (rev 15652)
@@ -0,0 +1,45 @@
+# $MidnightBSD$
+
+PORTNAME=	kmix
+PORTVERSION=	${KDE4_VERSION}
+CATEGORIES=	audio kde
+MASTER_SITES=	${MASTER_SITE_KDE}
+MASTER_SITE_SUBDIR=	${KDE4_BRANCH}/${PORTVERSION}/src
+DIST_SUBDIR=	KDE/${PORTVERSION}
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Sound mixer for KDE
+
+LICENSE=	gpl2
+
+CONFLICTS_INSTALL=	kdemultimedia-4.[1-8].*
+
+USES=		cmake:outsource
+NO_STAGE=	yes
+USE_KDE4=	automoc4 kdehier kdelibs kdeprefix
+USE_QT4=	gui phonon xml \
+		moc_build qmake_build rcc_build uic_build
+USE_XZ=		yes
+
+OPTIONS_DEFINE=	ALSA PULSEAUDIO
+
+.include <bsd.mport.options.mk>
+
+.if ${PORT_OPTIONS:MALSA}
+LIB_DEPENDS+=	asound.2:${PORTSDIR}/audio/alsa-lib
+.else
+EXTRA_PATCHES+=	${FILESDIR}/extrapatch-no_alsa
+.endif
+
+.if ${PORT_OPTIONS:MPULSEAUDIO}
+CMAKE_ARGS+=	-DWITH_Canberra:BOOL=ON \
+		-DWITH_PulseAudio:BOOL=ON
+LIB_DEPENDS+=	canberra.0:${PORTSDIR}/audio/libcanberra \
+		pulse.0:${PORTSDIR}/audio/pulseaudio
+USE_GNOME=	glib20
+.else
+CMAKE_ARGS+=	-DWITH_Canberra:BOOL=OFF \
+		-DWITH_PulseAudio:BOOL=OFF
+.endif
+
+.include <bsd.port.mk>

Added: trunk/audio/kmix/distinfo
===================================================================
--- trunk/audio/kmix/distinfo	                        (rev 0)
+++ trunk/audio/kmix/distinfo	2013-12-05 02:47:36 UTC (rev 15652)
@@ -0,0 +1,2 @@
+SHA256 (KDE/4.10.5/kmix-4.10.5.tar.xz) = 5b7243d821774bfc376706ddf7145aa5f2edc4905d786d46ff7ae76681309a22
+SIZE (KDE/4.10.5/kmix-4.10.5.tar.xz) = 386912

Added: trunk/audio/kmix/files/extrapatch-no_alsa
===================================================================
--- trunk/audio/kmix/files/extrapatch-no_alsa	                        (rev 0)
+++ trunk/audio/kmix/files/extrapatch-no_alsa	2013-12-05 02:47:36 UTC (rev 15652)
@@ -0,0 +1,20 @@
+--- CMakeLists.txt~	2012-06-29 17:55:35.000000000 -0300
++++ CMakeLists.txt	2012-06-29 17:56:25.000000000 -0300
+@@ -6,7 +6,7 @@
+ include(KDE4Defaults)
+ include(MacroLibrary)
+ 
+-find_package(Alsa)
++find_file(CONFIG_ALSA_H_CMAKE config-alsa.h.cmake ${CMAKE_MODULE_PATH})
+ 
+ macro_optional_find_package(PulseAudio "0.9.12")
+ macro_log_feature(PULSEAUDIO_FOUND "PulseAudio" "PulseAudio Audio Server" "http://www.pulseaudio.org/" FALSE "0.9.12" "libpulse is needed to let KMix control PulseAudio")
+@@ -14,7 +14,7 @@
+ macro_optional_find_package(Canberra)
+ macro_log_feature(CANBERRA_FOUND "libcanberra" "libcanberra audio library" "http://0pointer.de/lennart/projects/libcanberra/" FALSE "" "libcanberra is needed for kmix sound feedback")
+ 
+-alsa_configure_file(${CMAKE_BINARY_DIR}/config-alsa.h)
++configure_file(${CONFIG_ALSA_H_CMAKE} ${CMAKE_BINARY_DIR}/config-alsa.h)
+ 
+ 
+ add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS} )

Added: trunk/audio/kmix/files/patch-libcxx
===================================================================
--- trunk/audio/kmix/files/patch-libcxx	                        (rev 0)
+++ trunk/audio/kmix/files/patch-libcxx	2013-12-05 02:47:36 UTC (rev 15652)
@@ -0,0 +1,245 @@
+commit f184967a01381ca43a02d44edf3158e6cc0be376
+Author: Raphael Kubo da Costa <rakuco at FreeBSD.org>
+Date:   Tue Sep 3 12:55:39 2013 +0300
+
+    Properly detect the location of STL's shared_ptr.
+
+    std::shared_ptr is a C++11 feature, whose location (and existence) in STL
+    implementations of previous C++ standards varied -- one widespread example
+    is GCC's libstdc++, which has a shared_ptr implementation in <tr1/memory>
+    that was shipped long before C++11.
+
+    However, including it unconditionally breaks the build if any other STL
+    implementation (such as libc++) is used instead.
+
+    We now check if std::shared_ptr is present in the <memory> header and then
+    try std::tr1::shared_ptr as a fallback.
+
+    REVIEW:             112434
+
+commit 111de2e86a3a79d43744e7d76a5a0be1d6e8fe0d
+Author: Raphael Kubo da Costa <rakuco at FreeBSD.org>
+Date:   Tue Sep 3 12:54:48 2013 +0300
+
+    Use operator bool() instead of != and == for shared_ptr.
+
+    (This is part 1 of 2 of the shared_ptr changes)
+
+    In preparation for supporting C++11's version of shared_ptr, convert
+    some
+    comparisons to operator bool(), that is
+
+      if (foo != 0) becomes if (foo)
+      if (foo == 0) becomes if (!foo)
+
+    as otherwise the build (with clang and libc++) would fail because there is
+    no overload for operator==(shared_ptr, int) and operator!=(shared_ptr, int).
+
+    REVIEW:             112433
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a442972..1f75530 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -26,6 +26,17 @@ if(MSVC)
+ endif(MSVC)
+ 
+ 
++include(CheckCXXSourceCompiles)
++check_cxx_source_compiles("
++    #include <memory>
++    int main() { std::shared_ptr<int> p; return 0; }
++" HAVE_STD_SHARED_PTR)
++check_cxx_source_compiles("
++    #include <tr1/memory>
++    int main() { std::tr1::shared_ptr<int> p; return 0; }
++" HAVE_STD_TR1_SHARED_PTR)
++
++
+ configure_file (config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
+ 
+ 
+diff --git a/apps/kmixd.cpp b/apps/kmixd.cpp
+index 442abaf..9385a6a 100644
+--- apps/kmixd.cpp
++++ apps/kmixd.cpp
+@@ -156,7 +156,7 @@ void KMixD::saveBaseConfig()
+       config.writeEntry( "MasterMixer", mixerMasterCard->id() );
+    }
+    shared_ptr<MixDevice> mdMaster = Mixer::getGlobalMasterMD();
+-   if ( mdMaster != 0 ) {
++   if ( mdMaster ) {
+       config.writeEntry( "MasterMixerDevice", mdMaster->id() );
+    }
+    QString mixerIgnoreExpression = MixerToolBox::instance()->mixerIgnoreExpression();
+diff --git a/backends/mixer_backend.cpp b/backends/mixer_backend.cpp
+index 2e2e901..2105d2a 100644
+--- backends/mixer_backend.cpp
++++ backends/mixer_backend.cpp
+@@ -241,7 +241,7 @@ void Mixer_Backend::readSetFromHW()
+  */
+ shared_ptr<MixDevice> Mixer_Backend::recommendedMaster()
+ {
+-	if ( m_recommendedMaster != 0 )
++	if ( m_recommendedMaster )
+ 	{
+ 		// Backend has set a recommended master. Thats fine. Using it.
+ 		return m_recommendedMaster;
+diff --git a/backends/mixer_mpris2.cpp b/backends/mixer_mpris2.cpp
+index 6ebcd8f..75ef129 100644
+--- backends/mixer_mpris2.cpp
++++ backends/mixer_mpris2.cpp
+@@ -535,7 +535,7 @@ void Mixer_MPRIS2::newMediaPlayer(QString name, QString oldOwner, QString newOwn
+ 			}
+ 
+ 			shared_ptr<MixDevice> md = m_mixDevices.get(id);
+-			if (md != 0)
++			if (md)
+ 			{
+ 				// We know about the player that is unregistering => remove internally
+ 				md->close();
+diff --git a/config.h.cmake b/config.h.cmake
+index 032f8c1..acd9a9c 100644
+--- config.h.cmake
++++ config.h.cmake
+@@ -15,3 +15,9 @@
+ 
+ /* Define to 1 if you have the <unistd.h> header file. */
+ #cmakedefine HAVE_UNISTD_H 1
++
++/* Define to 1 if <tr1/memory> exists and defines std::tr1::shared_ptr. */
++#cmakedefine HAVE_STD_TR1_SHARED_PTR 1
++
++/* Define to 1 if <memory> exists and defines std::shared_ptr. */
++#cmakedefine HAVE_STD_SHARED_PTR 1
+diff --git a/core/ControlPool.h b/core/ControlPool.h
+index 4cb2222..b045ce0 100644
+--- core/ControlPool.h
++++ core/ControlPool.h
+@@ -22,12 +22,15 @@
+ #ifndef CONTROL_POOL_H
+ #define CONTROL_POOL_H
+ 
++#include "config.h"
+ 
+-// std::shared_ptr
++#if defined(HAVE_STD_SHARED_PTR)
+ #include <memory>
++using std::shared_ptr;
++#elif defined(HAVE_STD_TR1_SHARED_PTR)
+ #include <tr1/memory>
+-
+-using namespace ::std::tr1;
++using std::tr1::shared_ptr;
++#endif
+ 
+ #include "core/mixdevice.h"
+ 
+diff --git a/core/MasterControl.h b/core/MasterControl.h
+index dff9e95..16472ff 100644
+--- core/MasterControl.h
++++ core/MasterControl.h
+@@ -8,12 +8,17 @@
+ #ifndef MASTERCONTROL_H_
+ #define MASTERCONTROL_H_
+ 
+-#include <QString>
++#include "config.h"
+ 
+-// std::shared_ptr
++#if defined(HAVE_STD_SHARED_PTR)
+ #include <memory>
++using std::shared_ptr;
++#elif defined(HAVE_STD_TR1_SHARED_PTR)
+ #include <tr1/memory>
+-using namespace ::std::tr1;
++using std::tr1::shared_ptr;
++#endif
++
++#include <QString>
+ 
+ class MasterControl
+ {
+diff --git a/core/mixdevice.h b/core/mixdevice.h
+index f5ca782..fb554a2 100644
+--- core/mixdevice.h
++++ core/mixdevice.h
+@@ -21,10 +21,15 @@
+ #ifndef MixDevice_h
+ #define MixDevice_h
+ 
+-// std::shared_ptr
++#include "config.h"
++
++#if defined(HAVE_STD_SHARED_PTR)
+ #include <memory>
++using std::shared_ptr;
++#elif defined(HAVE_STD_TR1_SHARED_PTR)
+ #include <tr1/memory>
+-using namespace ::std::tr1;
++using std::tr1::shared_ptr;
++#endif
+ 
+ //KMix
+ class Mixer;
+diff --git a/core/mixertoolbox.cpp b/core/mixertoolbox.cpp
+index 60c9fc8..41386d4 100644
+--- core/mixertoolbox.cpp
++++ core/mixertoolbox.cpp
+@@ -248,13 +248,13 @@ void MixerToolBox::initMixerInternal(MultiDriverMode multiDriverMode, QList<QStr
+ 
+    
+     // Add a master device (if we haven't defined one yet)
+-   if ( Mixer::getGlobalMasterMD(false) == 0 ) {
++   if ( !Mixer::getGlobalMasterMD(false) ) {
+       // We have no master card yet. This actually only happens when there was
+       // not one defined in the kmixrc.
+       // So lets just set the first card as master card.
+       if ( Mixer::mixers().count() > 0 ) {
+     	  shared_ptr<MixDevice> master = Mixer::mixers().first()->getLocalMasterMD();
+-         if ( master != 0 ) {
++         if ( master ) {
+              QString controlId = master->id();
+              Mixer::setGlobalMaster( Mixer::mixers().first()->id(), controlId, true);
+          }
+diff --git a/gui/kmixdockwidget.cpp b/gui/kmixdockwidget.cpp
+index 47e8073..e84338e 100644
+--- gui/kmixdockwidget.cpp
++++ gui/kmixdockwidget.cpp
+@@ -215,7 +215,7 @@ void KMixDockWidget::updatePixmap()
+ 	shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+ 
+     char newPixmapType;
+-    if ( md == 0 )
++    if ( !md )
+     {
+         newPixmapType = 'e';
+     }
+@@ -405,7 +405,7 @@ void KMixDockWidget::contextMenuAboutToShow()
+ void KMixDockWidget::updateDockMuteAction ( KToggleAction* dockMuteAction )
+ {  
+     shared_ptr<MixDevice> md = Mixer::getGlobalMasterMD();
+-    if ( md != 0 && dockMuteAction != 0 )
++    if ( md && dockMuteAction != 0 )
+     {
+     	Volume& vol = md->playbackVolume().hasVolume() ? md->playbackVolume() : md->captureVolume();
+     	bool isInactive =  vol.isCapture() ? !md->isRecSource() : md->isMuted();
+diff --git a/gui/viewdockareapopup.cpp b/gui/viewdockareapopup.cpp
+index 48411bd..45edc32 100644
+--- gui/viewdockareapopup.cpp
++++ gui/viewdockareapopup.cpp
+@@ -248,12 +248,12 @@ Application: KMix (kmix), signal: Segmentation fault
+ 	{
+ //		kDebug() << "ADD? mixerId=" << mixer->id();
+ 		shared_ptr<MixDevice>dockMD = mixer->getLocalMasterMD();
+-		if ( dockMD == 0 && mixer->size() > 0 )
++		if ( !dockMD && mixer->size() > 0 )
+ 		{
+ 			// If we have no dock device yet, we will take the first available mixer device.
+ 			dockMD = (*mixer)[0];
+ 		}
+-		if ( dockMD != 0 )
++		if ( dockMD )
+ 		{
+ //			kDebug() << "ADD? mixerId=" << mixer->id() << ", md=" << dockMD->id();
+ 			if ( !dockMD->isApplicationStream() && dockMD->playbackVolume().hasVolume())

Added: trunk/audio/kmix/pkg-descr
===================================================================
--- trunk/audio/kmix/pkg-descr	                        (rev 0)
+++ trunk/audio/kmix/pkg-descr	2013-12-05 02:47:36 UTC (rev 15652)
@@ -0,0 +1,5 @@
+KMix is an application to allow you to change the volume of your sound
+card. Though small, it is full-featured, and it supports several
+platforms and sound drivers.
+
+WWW:	http://www.kde.org/applications/multimedia/kmix/

Added: trunk/audio/kmix/pkg-plist
===================================================================
--- trunk/audio/kmix/pkg-plist	                        (rev 0)
+++ trunk/audio/kmix/pkg-plist	2013-12-05 02:47:36 UTC (rev 15652)
@@ -0,0 +1,57 @@
+bin/kmix
+bin/kmixctrl
+lib/kde4/kded_kmixd.so
+lib/kde4/plasma_engine_mixer.so
+lib/libkdeinit4_kmix.so
+lib/libkdeinit4_kmixctrl.so
+share/applications/kde4/kmix.desktop
+share/apps/kmix/kmixui.rc
+share/apps/kmix/pics/kmixdocked.png
+share/apps/kmix/pics/kmixdocked_error.png
+share/apps/kmix/pics/kmixdocked_mute.png
+share/apps/kmix/pics/mixer-ac97.png
+share/apps/kmix/pics/mixer-capture.png
+share/apps/kmix/pics/mixer-cd.png
+share/apps/kmix/pics/mixer-digital.png
+share/apps/kmix/pics/mixer-front.png
+share/apps/kmix/pics/mixer-headset.png
+share/apps/kmix/pics/mixer-lfe.png
+share/apps/kmix/pics/mixer-line.png
+share/apps/kmix/pics/mixer-master.png
+share/apps/kmix/pics/mixer-microphone.png
+share/apps/kmix/pics/mixer-midi.png
+share/apps/kmix/pics/mixer-pcm-default.png
+share/apps/kmix/pics/mixer-pcm.png
+share/apps/kmix/pics/mixer-surround.png
+share/apps/kmix/pics/mixer-video.png
+share/apps/kmix/profiles/ALSA.TerraTec_DMX6Fire.1.default.xml
+share/apps/kmix/profiles/ALSA.capture.xml
+share/apps/kmix/profiles/ALSA.default.xml
+share/apps/kmix/profiles/ALSA.playback.xml
+share/apps/kmix/profiles/OSS.default.xml
+share/apps/plasma/services/mixer.operations
+share/autostart/kmix_autostart.desktop
+share/autostart/restore_kmix_volumes.desktop
+share/dbus-1/interfaces/org.kde.kmix.control.xml
+share/dbus-1/interfaces/org.kde.kmix.mixer.xml
+share/dbus-1/interfaces/org.kde.kmix.mixset.xml
+share/doc/HTML/en/kmix/common
+share/doc/HTML/en/kmix/index.cache.bz2
+share/doc/HTML/en/kmix/index.docbook
+share/doc/HTML/en/kmix/kmix-configure.png
+share/doc/HTML/en/kmix/kmix-file.png
+share/doc/HTML/en/kmix/kmix-master.png
+share/doc/HTML/en/kmix/kmix-options.png
+share/doc/HTML/en/kmix/kmix.png
+share/icons/hicolor/128x128/apps/kmix.png
+share/icons/hicolor/16x16/apps/kmix.png
+share/icons/hicolor/32x32/apps/kmix.png
+share/icons/hicolor/48x48/apps/kmix.png
+share/icons/hicolor/64x64/apps/kmix.png
+share/kde4/services/kded/kmixd.desktop
+share/kde4/services/kmixctrl_restore.desktop
+share/kde4/services/plasma-engine-mixer.desktop
+ at dirrm share/doc/HTML/en/kmix
+ at dirrm share/apps/kmix/profiles
+ at dirrm share/apps/kmix/pics
+ at dirrm share/apps/kmix



More information about the Midnightbsd-cvs mailing list