From owner-svn-ports-head@FreeBSD.ORG Sat Mar 7 21:16:59 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32D5DD05; Sat, 7 Mar 2015 21:16:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7A675D; Sat, 7 Mar 2015 21:16:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27LGwdO070085; Sat, 7 Mar 2015 21:16:58 GMT (envelope-from lme@FreeBSD.org) Received: (from lme@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27LGvFx070078; Sat, 7 Mar 2015 21:16:57 GMT (envelope-from lme@FreeBSD.org) Message-Id: <201503072116.t27LGvFx070078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: lme set sender to lme@FreeBSD.org using -f From: Lars Engels Date: Sat, 7 Mar 2015 21:16:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r380717 - in head/audio: . volumeicon volumeicon/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 21:16:59 -0000 Author: lme Date: Sat Mar 7 21:16:56 2015 New Revision: 380717 URL: https://svnweb.freebsd.org/changeset/ports/380717 QAT: https://qat.redports.org/buildarchive/r380717/ Log: Add audio/volumeicon 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 Reviewed by: tijl Added: head/audio/volumeicon/ head/audio/volumeicon/Makefile (contents, props changed) head/audio/volumeicon/distinfo (contents, props changed) head/audio/volumeicon/files/ head/audio/volumeicon/files/patch-src_oss__backend.c (contents, props changed) head/audio/volumeicon/pkg-descr (contents, props changed) head/audio/volumeicon/pkg-plist (contents, props changed) Modified: head/audio/Makefile Modified: head/audio/Makefile ============================================================================== --- head/audio/Makefile Sat Mar 7 20:56:36 2015 (r380716) +++ head/audio/Makefile Sat Mar 7 21:16:56 2015 (r380717) @@ -766,6 +766,7 @@ SUBDIR += vo-aacenc SUBDIR += vo-amrwbenc SUBDIR += voipong + SUBDIR += volumeicon SUBDIR += vorbis-tools SUBDIR += vorbisgain SUBDIR += vsound Added: head/audio/volumeicon/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/volumeicon/Makefile Sat Mar 7 21:16:56 2015 (r380717) @@ -0,0 +1,29 @@ +# $FreeBSD$ + +PORTNAME= volumeicon +PORTVERSION= 0.5.0 +CATEGORIES= audio +MASTER_SITES= http://softwarebakery.com/maato/files/volumeicon/ + +MAINTAINER= lme@FfreeBSD.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 + +OPTIONS_DEFINE= NLS NOTIFY +OPTIONS_DEFAULT= NOTIFY +OPTIONS_SUB= yes + +NOTIFY_LIB_DEPENDS= libnotify.so:${PORTSDIR}/devel/libnotify +NOTIFY_CONFIGURE_ENABLE=notify + +.include Added: head/audio/volumeicon/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/volumeicon/distinfo Sat Mar 7 21:16:56 2015 (r380717) @@ -0,0 +1,2 @@ +SHA256 (volumeicon-0.5.0.tar.gz) = e5f1179f9ec5ab25e3740e4f6bbe0baa75368f0ae87d370197b3fbefb61bd782 +SIZE (volumeicon-0.5.0.tar.gz) = 160089 Added: head/audio/volumeicon/files/patch-src_oss__backend.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/volumeicon/files/patch-src_oss__backend.c Sat Mar 7 21:16:56 2015 (r380717) @@ -0,0 +1,180 @@ +--- src/oss_backend.c.orig 2013-02-25 16:52:49.000000000 +0100 ++++ src/oss_backend.c 2015-03-07 20:58:26.522101000 +0100 +@@ -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); + ++#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) + 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 + } Added: head/audio/volumeicon/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/volumeicon/pkg-descr Sat Mar 7 21:16:56 2015 (r380717) @@ -0,0 +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 Added: head/audio/volumeicon/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/volumeicon/pkg-plist Sat Mar 7 21:16:56 2015 (r380717) @@ -0,0 +1,36 @@ +bin/volumeicon +%%NLS%%share/locale/fr/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