Index: head/multimedia/qt5-multimedia/Makefile =================================================================== --- head/multimedia/qt5-multimedia/Makefile (revision 459517) +++ head/multimedia/qt5-multimedia/Makefile (revision 459518) @@ -1,58 +1,58 @@ # $FreeBSD$ PORTNAME= multimedia DISTVERSION= ${QT5_VERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia PKGNAMEPREFIX= qt5- MAINTAINER= kde@FreeBSD.org COMMENT= Qt audio, video, radio and camera support module # LICENSE set via USES_QT5 (bsd.qt.mk) USES= pkgconfig qmake:norecursive USE_GL= gl USE_GNOME= glib20 USE_QT5= core gui network opengl qml quick widgets \ buildtools_build QT_DIST= ${PORTNAME} USE_XORG= x11 xext xv USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL} QT_CONFIG= xlib # TODO: Bug 225100: the machinery in bsd.qt.mk's qt-post-install target does # not seem to account for the case of a module no longer defining QT_DEFINES: # the lines in qconfig-modules.h including said module's qconfig-.h # will remain. We're setting it below to avoid build errors, but this needs to # be fixed properly later. QT_DEFINES= _QTMULTIMEDIA_DUMMY OPTIONS_DEFINE= GSTREAMER OPENAL OPTIONS_DEFAULT= ALSA GSTREAMER OPTIONS_RADIO= AUDIOPLUGIN OPTIONS_RADIO_AUDIOPLUGIN= ALSA PULSEAUDIO OPTIONS_SUB= yes AUDIOPLUGIN_DESC= Audio plugins to build OPENAL_DESC= 3D positional spatialized sound support ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_VARS= QT_CONFIG+=alsa ALSA_VARS_OFF= QT_CONFIG+=-alsa \ QMAKE_CONFIGURE_ARGS+=-no-alsa GSTREAMER_BUILD_DEPENDS=${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat GSTREAMER_USE= GSTREAMER1=bad GSTREAMER_VARS= QT_CONFIG+=gstreamer-1.0 \ QMAKE_CONFIGURE_ARGS+=-gstreamer 1.0 GSTREAMER_VARS_OFF= QT_CONFIG+=-gstreamer-1.0 \ QMAKE_CONFIGURE_ARGS+=-no-gstreamer OPENAL_USES= openal OPENAL_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-openal PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= QT_CONFIG+=pulseaudio PULSEAUDIO_VARS_OFF= QT_CONFIG+=-pulseaudio \ QMAKE_CONFIGURE_ARGS+=-no-pulseaudio .include Index: head/multimedia/qt5-multimedia/files/patch-src_plugins_alsa_qalsaaudiodeviceinfo.cpp =================================================================== --- head/multimedia/qt5-multimedia/files/patch-src_plugins_alsa_qalsaaudiodeviceinfo.cpp (nonexistent) +++ head/multimedia/qt5-multimedia/files/patch-src_plugins_alsa_qalsaaudiodeviceinfo.cpp (revision 459518) @@ -0,0 +1,70 @@ +Patch from Stephen Hurd. PR208570. Allow ALSA aliases. + +When using ALSA with FreeBSD, the direct snd_device instances are not +available, only plugin devices and "default". For programs which use +QAudio, this means there are *no* devices enumerated using +QAudio::availableDevices(). + +The attached patch adds the aliases to the available device list. + +--- src/plugins/alsa/qalsaaudiodeviceinfo.cpp.orig 2017-11-08 14:04:46 UTC ++++ src/plugins/alsa/qalsaaudiodeviceinfo.cpp +@@ -353,6 +353,58 @@ QList QAlsaAudioDeviceInfo:: + ++n; + } + snd_device_name_free_hint(hints); ++ ++#ifdef Q_OS_FREEBSD ++ // Now find aliases... ++ snd_config_iterator_t pos, next; ++ snd_config_t *top, *node, *type; ++ snd_pcm_t *pcm; ++ snd_pcm_stream_t streamType; ++ const char *idString; ++ const char **ignoreId; ++ static const char *ignore[] = {"hw", "plughw", "plug", "dsnoop", "tee", ++ "file", "null", "shm", "cards", "rate_convert", NULL}; ++ ++ // Populate snd_config... ++ if (snd_config == NULL) ++ snd_config_update(); ++ if (snd_config != NULL) { ++ switch (mode) { ++ case QAudio::AudioInput: ++ streamType = SND_PCM_STREAM_CAPTURE; ++ break; ++ case QAudio::AudioOutput: ++ streamType = SND_PCM_STREAM_PLAYBACK; ++ break; ++ default: ++ goto bad_mode; ++ } ++ // Find "pcm" nodes... ++ if (snd_config_search(snd_config, "pcm", &top) >= 0) { ++ for (pos = snd_config_iterator_first(top), next = snd_config_iterator_next(pos); ++ pos != snd_config_iterator_end(top); ++ pos = next, next = snd_config_iterator_next(pos)) { ++ node = snd_config_iterator_entry(pos); ++ if (snd_config_search(node, "type", &type) < 0) ++ continue; ++ snd_config_get_id(node, &idString); ++ for (ignoreId = ignore; *ignoreId; ignoreId++) { ++ if (strcmp(*ignoreId, idString) == 0) ++ break; ++ } ++ if (*ignoreId) ++ continue; ++ // Ensure it's available... ++ if (snd_pcm_open(&pcm, idString, streamType, 0)) ++ continue; ++ snd_pcm_close(pcm); ++ const QString deviceName = QLatin1String(idString); ++ devices.append(deviceName.toLocal8Bit().constData()); ++ } ++ } ++ } ++bad_mode: ++#endif + #else + int idx = 0; + char* name; Property changes on: head/multimedia/qt5-multimedia/files/patch-src_plugins_alsa_qalsaaudiodeviceinfo.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property