Index: head/audio/volumeicon/Makefile =================================================================== --- head/audio/volumeicon/Makefile (revision 456200) +++ head/audio/volumeicon/Makefile (revision 456201) @@ -1,29 +1,36 @@ # $FreeBSD$ PORTNAME= volumeicon -PORTVERSION= 0.5.0 +PORTVERSION= 0.5.1 CATEGORIES= audio -MASTER_SITES= http://softwarebakery.com/maato/files/volumeicon/ MAINTAINER= lme@FreeBSD.org COMMENT= Lightweight volume control for the systray LICENSE= GPLv3 GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-oss \ --with-oss-include-path=/usr/include/sys CPPFLAGS+= -I${LOCALBASE}/include LIBS+= -L${LOCALBASE}/lib -USES= gmake gettext pkgconfig -USE_GNOME= gtk30 intltool +USES= autoreconf gmake gettext pkgconfig +USE_GNOME= gtk30 intltool cairo gdkpixbuf2 +USE_XORG= x11 +USE_GITHUB= yes +GH_ACCOUNT= Maato OPTIONS_DEFINE= NLS NOTIFY OPTIONS_DEFAULT= NOTIFY OPTIONS_SUB= yes +NLS_USES= gettext + NOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify NOTIFY_CONFIGURE_ENABLE=notify + +pre-configure: + cd ${WRKSRC} && ./autogen.sh .include Index: head/audio/volumeicon/distinfo =================================================================== --- head/audio/volumeicon/distinfo (revision 456200) +++ head/audio/volumeicon/distinfo (revision 456201) @@ -1,2 +1,3 @@ -SHA256 (volumeicon-0.5.0.tar.gz) = e5f1179f9ec5ab25e3740e4f6bbe0baa75368f0ae87d370197b3fbefb61bd782 -SIZE (volumeicon-0.5.0.tar.gz) = 160089 +TIMESTAMP = 1513090597 +SHA256 (Maato-volumeicon-0.5.1_GH0.tar.gz) = 607979f316e6837eb7c65837c71b213a7dc6a2091153504f7b177a1d67f3da71 +SIZE (Maato-volumeicon-0.5.1_GH0.tar.gz) = 60651 Index: head/audio/volumeicon/files/patch-data_gui_preferences.ui =================================================================== --- head/audio/volumeicon/files/patch-data_gui_preferences.ui (nonexistent) +++ head/audio/volumeicon/files/patch-data_gui_preferences.ui (revision 456201) @@ -0,0 +1,11 @@ +--- data/gui/preferences.ui.orig 2017-12-12 18:43:30 UTC ++++ data/gui/preferences.ui +@@ -197,7 +197,7 @@ + + True + False +- <b>Alsa</b> ++ <b>OSS</b> + True + + Property changes on: head/audio/volumeicon/files/patch-data_gui_preferences.ui ___________________________________________________________________ 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 Index: head/audio/volumeicon/files/patch-src_oss__backend.c =================================================================== --- head/audio/volumeicon/files/patch-src_oss__backend.c (revision 456200) +++ head/audio/volumeicon/files/patch-src_oss__backend.c (revision 456201) @@ -1,180 +1,190 @@ ---- src/oss_backend.c.orig 2013-02-25 15:52:49 UTC +--- src/oss_backend.c.orig 2015-03-02 22:54:36 UTC +++ src/oss_backend.c @@ -22,7 +22,7 @@ //############################################################################## #include OSS_HEADER -#include +#include #include #include #include @@ -30,12 +30,16 @@ #include "oss_backend.h" +#define MIXT_MONOSLIDER16 19 +#define MIXT_STEREOSLIDER16 20 +#define MIXT_MUTE 21 + //############################################################################## // Static variables //############################################################################## static char * m_channel = NULL; static GList * m_channel_names = NULL; -static int m_actual_maxvalue = 0; +//static int m_actual_maxvalue = 0; static int m_mixer_fd = -1; static oss_mixext m_ext; @@ -44,6 +48,7 @@ static oss_mixext m_ext; //############################################################################## static int get_raw_value() { +#if 0 assert(m_mixer_fd != -1); oss_mixer_value vr; @@ -51,7 +56,7 @@ static int get_raw_value() vr.ctrl = m_ext.ctrl; vr.timestamp = m_ext.timestamp; - int result = ioctl(m_mixer_fd, SNDCTL_MIX_READ, &vr); + int result = ioctl(m_mixer_fd, SOUND_MIXER_READ_VOLUME, &vr); if(result == -1) return 0; @@ -78,6 +83,7 @@ static int get_raw_value() return short_value->lower; } +#endif return 0; } @@ -97,9 +103,20 @@ const GList * oss_get_channel_names() int oss_get_volume() { assert(m_mixer_fd != -1); +#if 0 if(m_actual_maxvalue == 0) return 0; return 100 * get_raw_value() / m_actual_maxvalue; +#endif + + int current_volume; + if (ioctl(m_mixer_fd, SOUND_MIXER_READ_VOLUME, ¤t_volume) == -1) { + perror("Cannot read volume!"); + exit(EXIT_FAILURE); + } + + /* Only the left channel is returned */ + return current_volume & 0x7f; } gboolean oss_get_mute() @@ -108,6 +125,7 @@ gboolean oss_get_mute() gboolean mute = FALSE; +#if 0 // Save current control; int parent = m_ext.parent; int control = m_ext.ctrl; @@ -132,6 +150,7 @@ gboolean oss_get_mute() // Restore to previous control m_ext.ctrl = control; ioctl(m_mixer_fd, SNDCTL_MIX_EXTINFO, &m_ext); +#endif return mute; } @@ -148,12 +167,13 @@ void oss_setup(const gchar * card, const char * devmixer; if((devmixer=getenv("OSS_MIXERDEV")) == NULL) devmixer = "/dev/mixer"; - if((m_mixer_fd = open(devmixer, O_RDWR, 0)) == -1) + if((m_mixer_fd = open(devmixer, O_RDWR)) == -1) { perror(devmixer); exit(1); } +#if 0 // Check that there is at least one mixer int nmix; ioctl(m_mixer_fd, SNDCTL_MIX_NRMIX, &nmix); @@ -163,6 +183,7 @@ void oss_setup(const gchar * card, const exit(EXIT_FAILURE); } + m_ext.dev=0; m_ext.ctrl = 0; while(ioctl(m_mixer_fd, SNDCTL_MIX_EXTINFO, &m_ext) >= 0) @@ -175,6 +196,7 @@ void oss_setup(const gchar * card, const } m_ext.ctrl++; } +#endif // Setup channel using the provided channelname if(channel != NULL) @@ -195,6 +217,7 @@ void oss_set_channel(const gchar * chann g_free(m_channel); m_channel = g_strdup(channel); +#if 0 // Find channel and then return m_ext.dev=0; m_ext.ctrl = 0; @@ -207,6 +230,7 @@ void oss_set_channel(const gchar * chann } m_ext.ctrl++; } +#endif } void oss_set_mute(gboolean mute) @@ -219,6 +243,7 @@ void oss_set_mute(gboolean mute) // Check for mute in this group m_ext.ctrl = 0; +#if 0 while(ioctl(m_mixer_fd, SNDCTL_MIX_EXTINFO, &m_ext) >= 0) { if(m_ext.parent == parent && m_ext.type == MIXT_MUTE) @@ -239,6 +264,7 @@ void oss_set_mute(gboolean mute) m_ext.ctrl = control; ioctl(m_mixer_fd, SNDCTL_MIX_EXTINFO, &m_ext); +#endif // If no mute control was found, revert to setting the volume to zero if(!mute_found && mute) { @@ -251,6 +277,7 @@ void oss_set_volume(int volume) assert(m_mixer_fd != -1); - assert(volume >= 0 && volume <= 100); + volume = (volume < 0 ? 0 : (volume > 100 ? 100 : volume)); +#if 0 oss_mixer_value vr; vr.dev = m_ext.dev; vr.ctrl = m_ext.ctrl; -@@ -286,9 +313,14 @@ void oss_set_volume(int volume) +@@ -286,9 +313,24 @@ void oss_set_volume(int volume) default: return; } - - ioctl(m_mixer_fd, SNDCTL_MIX_WRITE, &vr); - +#endif + volume = (volume << 8) | volume; + if(ioctl(m_mixer_fd, SOUND_MIXER_WRITE_VOLUME, &volume) == -1) { + perror("Mixer write failed"); + exit(EXIT_FAILURE); + } +#if 0 if(volume == 100) m_actual_maxvalue = get_raw_value(); +#endif ++} ++ ++const gchar * oss_get_device() ++{ ++ return NULL; ++} ++ ++const GList * oss_get_device_names() ++{ ++ return NULL; } Index: head/audio/volumeicon/files/patch-src_oss__backend.h =================================================================== --- head/audio/volumeicon/files/patch-src_oss__backend.h (nonexistent) +++ head/audio/volumeicon/files/patch-src_oss__backend.h (revision 456201) @@ -0,0 +1,10 @@ +--- src/oss_backend.h.orig 2015-03-02 22:54:36 UTC ++++ src/oss_backend.h +@@ -35,5 +35,7 @@ int oss_get_volume(); + gboolean oss_get_mute(); + const gchar * oss_get_channel(); + const GList * oss_get_channel_names(); ++const gchar * oss_get_device(); ++const GList * oss_get_device_names(); + + #endif Property changes on: head/audio/volumeicon/files/patch-src_oss__backend.h ___________________________________________________________________ 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 Index: head/audio/volumeicon/files/patch-src_volumeicon.c =================================================================== --- head/audio/volumeicon/files/patch-src_volumeicon.c (nonexistent) +++ head/audio/volumeicon/files/patch-src_volumeicon.c (revision 456201) @@ -0,0 +1,11 @@ +--- src/volumeicon.c.orig 2015-03-02 22:54:36 UTC ++++ src/volumeicon.c +@@ -1295,6 +1295,8 @@ int main(int argc, char * argv[]) + backend_get_mute = &oss_get_mute; + backend_get_channel = &oss_get_channel; + backend_get_channel_names = &oss_get_channel_names; ++ backend_get_device = &oss_get_device; ++ backend_get_device_names = &oss_get_device_names; + #else + backend_setup = &asound_setup; + backend_set_channel = &asound_set_channel; Property changes on: head/audio/volumeicon/files/patch-src_volumeicon.c ___________________________________________________________________ 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 Index: head/audio/volumeicon/pkg-descr =================================================================== --- head/audio/volumeicon/pkg-descr (revision 456200) +++ head/audio/volumeicon/pkg-descr (revision 456201) @@ -1,13 +1,13 @@ Volume Icon aims to be a lightweight volume control that sits in your systray. It is often used in conjuction with the lightweight tint2 panel/taskbar. Features - Change volume by scrolling on the systray icon - Ability to choose which channel to control - Several icon themes (with gtk theme as default) - Configurable external mixer - Volume Slider - Hotkey support -WWW: http://softwarebakery.com/maato/volumeicon.html +WWW: https://github.com/Maato/volumeicon/ Index: head/audio/volumeicon/pkg-plist =================================================================== --- head/audio/volumeicon/pkg-plist (revision 456200) +++ head/audio/volumeicon/pkg-plist (revision 456201) @@ -1,36 +1,38 @@ bin/volumeicon +%%NLS%%share/locale/de/LC_MESSAGES/volumeicon.mo %%NLS%%share/locale/fr/LC_MESSAGES/volumeicon.mo +%%NLS%%share/locale/pl/LC_MESSAGES/volumeicon.mo %%DATADIR%%/gui/appicon.svg %%DATADIR%%/gui/preferences.ui %%DATADIR%%/icons/Black Gnome/1.png %%DATADIR%%/icons/Black Gnome/2.png %%DATADIR%%/icons/Black Gnome/3.png %%DATADIR%%/icons/Black Gnome/4.png %%DATADIR%%/icons/Black Gnome/5.png %%DATADIR%%/icons/Black Gnome/6.png %%DATADIR%%/icons/Black Gnome/7.png %%DATADIR%%/icons/Black Gnome/8.png %%DATADIR%%/icons/Blue Bar/1.png %%DATADIR%%/icons/Blue Bar/2.png %%DATADIR%%/icons/Blue Bar/3.png %%DATADIR%%/icons/Blue Bar/4.png %%DATADIR%%/icons/Blue Bar/5.png %%DATADIR%%/icons/Blue Bar/6.png %%DATADIR%%/icons/Blue Bar/7.png %%DATADIR%%/icons/Blue Bar/8.png %%DATADIR%%/icons/White Gnome/1.png %%DATADIR%%/icons/White Gnome/2.png %%DATADIR%%/icons/White Gnome/3.png %%DATADIR%%/icons/White Gnome/4.png %%DATADIR%%/icons/White Gnome/5.png %%DATADIR%%/icons/White Gnome/6.png %%DATADIR%%/icons/White Gnome/7.png %%DATADIR%%/icons/White Gnome/8.png %%DATADIR%%/icons/tango/1.png %%DATADIR%%/icons/tango/2.png %%DATADIR%%/icons/tango/3.png %%DATADIR%%/icons/tango/4.png %%DATADIR%%/icons/tango/5.png %%DATADIR%%/icons/tango/6.png %%DATADIR%%/icons/tango/7.png %%DATADIR%%/icons/tango/8.png