Update to 2.0

PR:		192571
Submitted by:	olivierd
This commit is contained in:
Romain Tartière 2015-01-04 11:53:22 +00:00
parent 5caff16673
commit 3cd9ee6df0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=376210
7 changed files with 256 additions and 16 deletions

View file

@ -2,24 +2,50 @@
# $FreeBSD$
PORTNAME= pavucontrol
PORTVERSION= 0.9.10
PORTREVISION= 3
PORTVERSION= 2.0
CATEGORIES= audio
MASTER_SITES= http://0pointer.de/lennart/projects/${PORTNAME}/
MASTER_SITES= http://freedesktop.org/software/pulseaudio/${PORTNAME}/
MAINTAINER= romain@FreeBSD.org
COMMENT= GTK mixer for PulseAudio
LIB_DEPENDS= libglademm-2.4.so:${PORTSDIR}/devel/libglademm24 \
libpulse.so:${PORTSDIR}/audio/pulseaudio \
libcanberra.so:${PORTSDIR}/audio/libcanberra
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
GNU_CONFIGURE= yes
USES= gettext gmake pkgconfig
USE_GNOME= intltool
USES= gmake pkgconfig gettext tar:xz
USE_GNOME= glibmm intltool libsigc++20
OPTIONS_SUB= yes
OPTIONS_SINGLE= GTK
OPTIONS_SINGLE_GTK= GTK2 GTK3
OPTIONS_DEFAULT= GTK2
CONFIGURE_ARGS= --disable-lynx
CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib
GTK2_USE= GNOME=gtkmm24
GTK2_LIB_DEPENDS= libcanberra.so:${PORTSDIR}/audio/libcanberra
GTK2_CONFIGURE_ON= --disable-gtk3
GTK3_USE= GNOME=gtkmm30
GTK3_LIB_DEPENDS= libcanberra-gtk3.so:${PORTSDIR}/audio/libcanberra-gtk3
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGTK2}
EXTRA_PATCHES= ${FILESDIR}/extra-patch-support-gtkmm-24.patch
.endif
.if ${PORT_OPTIONS:MGTK3}
EXTRA_PATCHES= ${FILESDIR}/extra-patch-support-gtkmm-30.patch \
${FILESDIR}/extra-patch-src_pavucontrol.glade
.endif
post-patch:
# Install locales files in right place
${REINPLACE_CMD} -e 's|[$$][(]DATADIRNAME[)]|share|' \
${WRKSRC}/po/Makefile.in.in
.include <bsd.port.mk>

View file

@ -1,2 +1,2 @@
SHA256 (pavucontrol-0.9.10.tar.gz) = 7ee96d2ddc28f53e392a1bc51a7316d2a9087ea2ad18e611f6f6725e756a5a3c
SIZE (pavucontrol-0.9.10.tar.gz) = 227735
SHA256 (pavucontrol-2.0.tar.xz) = 22f29dd81b4a1a34ec7bffe9b027aff2a37fc76ccded4539d43a8c126a39470b
SIZE (pavucontrol-2.0.tar.xz) = 151560

View file

@ -0,0 +1,52 @@
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 29 Aug 2014 09:42:04 +0200
Subject: Do not instantiate cardwidget, devicewidget and rolewidget with
a type of EventBox
--- src/pavucontrol.glade.orig 2012-12-17 09:50:42 UTC
+++ src/pavucontrol.glade
@@ -12,12 +12,12 @@
<property name="can_focus">False</property>
<property name="title" translatable="yes">window1</property>
<child>
- <object class="GtkEventBox" id="cardWidget">
+ <object class="GtkEventBox" id="cardWidgetBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible_window">False</property>
<child>
- <object class="GtkVBox" id="cardWidget1">
+ <object class="GtkVBox" id="cardWidget">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -202,12 +202,12 @@
<property name="can_focus">False</property>
<property name="title" translatable="yes">window1</property>
<child>
- <object class="GtkEventBox" id="deviceWidget">
+ <object class="GtkEventBox" id="deviceWidgetBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible_window">False</property>
<child>
- <object class="GtkVBox" id="streamWidget2">
+ <object class="GtkVBox" id="deviceWidget">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -1316,12 +1316,12 @@
<property name="can_focus">False</property>
<property name="title" translatable="yes">window1</property>
<child>
- <object class="GtkEventBox" id="streamWidget">
+ <object class="GtkEventBox" id="streamWidgetBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible_window">False</property>
<child>
- <object class="GtkVBox" id="streamWidget2">
+ <object class="GtkVBox" id="streamWidget">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>

View file

@ -0,0 +1,28 @@
From: Alam Arias <alam.gbc@gmail.com>
Date: Fri, 8 Mar 2013 14:27:02 -0500
Subject: added back support for gtkmm-2.4 builds
--- src/devicewidget.cc.orig 2012-12-17 09:50:42 UTC
+++ src/devicewidget.cc
@@ -63,8 +63,8 @@ DeviceWidget::DeviceWidget(BaseObjectTyp
for (unsigned i = 0; i < PA_CHANNELS_MAX; i++)
channelWidgets[i] = NULL;
- offsetAdjustment = Gtk::Adjustment::create(0.0, -2000.0, 2000.0, 10.0, 50.0, 0.0);
- offsetButton->configure(offsetAdjustment, 0, 2);
+ offsetAdjustment = new Gtk::Adjustment(0.0, -2000.0, 2000.0, 10.0, 50.0, 0.0);
+ offsetButton->configure(*offsetAdjustment, 0.0, 2);
}
void DeviceWidget::init(MainWindow* mainWindow, Glib::ustring deviceType) {
--- src/devicewidget.h.orig 2012-12-17 09:17:56 UTC
+++ src/devicewidget.h
@@ -98,7 +98,7 @@ protected:
Gtk::HBox *portSelect, *offsetSelect;
Gtk::ComboBox *portList;
Glib::RefPtr<Gtk::ListStore> treeModel;
- Glib::RefPtr<Gtk::Adjustment> offsetAdjustment;
+ Gtk::Adjustment *offsetAdjustment;
private:
Glib::ustring mDeviceType;

View file

@ -0,0 +1,134 @@
From: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 28 Aug 2014 12:58:05 +0200
Subject: Reference the widget before returning it from ::create methods
--- src/cardwidget.cc.orig 2011-08-12 14:18:44 UTC
+++ src/cardwidget.cc
@@ -45,6 +45,7 @@ CardWidget* CardWidget::create() {
CardWidget* w;
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "cardWidget");
x->get_widget_derived("cardWidget", w);
+ w->reference();
return w;
}
--- src/channelwidget.cc.orig 2011-03-10 07:39:25 UTC
+++ src/channelwidget.cc
@@ -53,6 +53,7 @@ ChannelWidget* ChannelWidget::create() {
x->add_from_file(GLADE_FILE, "adjustment1");
x->add_from_file(GLADE_FILE, "channelWidget");
x->get_widget_derived("channelWidget", w);
+ w->reference();
return w;
}
--- src/mainwindow.cc.orig 2012-12-17 09:19:04 UTC
+++ src/mainwindow.cc
@@ -298,6 +298,7 @@ void MainWindow::updateCard(const pa_car
else {
cardWidgets[info.index] = w = CardWidget::create();
cardsVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
is_new = true;
}
@@ -414,6 +415,7 @@ bool MainWindow::updateSink(const pa_sin
sinkWidgets[info.index] = w = SinkWidget::create(this);
w->setChannelMap(info.channel_map, !!(info.flags & PA_SINK_DECIBEL_VOLUME));
sinksVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
w->monitor_index = info.monitor_source;
is_new = true;
@@ -567,6 +569,7 @@ void MainWindow::updateSource(const pa_s
sourceWidgets[info.index] = w = SourceWidget::create(this);
w->setChannelMap(info.channel_map, !!(info.flags & PA_SOURCE_DECIBEL_VOLUME));
sourcesVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
is_new = true;
@@ -682,6 +685,7 @@ void MainWindow::updateSinkInput(const p
sinkInputWidgets[info.index] = w = SinkInputWidget::create(this);
w->setChannelMap(info.channel_map, true);
streamsVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
w->clientIndex = info.client;
is_new = true;
@@ -737,6 +741,7 @@ void MainWindow::updateSourceOutput(cons
w->setChannelMap(info.channel_map, true);
#endif
recsVBox->pack_start(*w, false, false, 0);
+ w->unreference();
w->index = info.index;
w->clientIndex = info.client;
is_new = true;
@@ -830,6 +835,7 @@ bool MainWindow::createEventRoleWidget()
eventRoleWidget = RoleWidget::create();
streamsVBox->pack_start(*eventRoleWidget, false, false, 0);
+ eventRoleWidget->unreference();
eventRoleWidget->role = "sink-input-by-media-role:event";
eventRoleWidget->setChannelMap(cm, true);
--- src/rolewidget.cc.orig 2011-03-10 07:39:25 UTC
+++ src/rolewidget.cc
@@ -40,6 +40,7 @@ RoleWidget* RoleWidget::create() {
RoleWidget* w;
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
+ w->reference();
return w;
}
--- src/sinkinputwidget.cc.orig 2011-03-10 07:39:25 UTC
+++ src/sinkinputwidget.cc
@@ -43,6 +43,7 @@ SinkInputWidget* SinkInputWidget::create
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
w->init(mainWindow);
+ w->reference();
return w;
}
--- src/sinkwidget.cc.orig 2012-12-17 09:50:42 UTC
+++ src/sinkwidget.cc
@@ -70,6 +70,7 @@ SinkWidget* SinkWidget::create(MainWindo
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget");
x->get_widget_derived("deviceWidget", w);
w->init(mainWindow, "sink");
+ w->reference();
return w;
}
--- src/sourceoutputwidget.cc.orig 2011-08-08 13:33:17 UTC
+++ src/sourceoutputwidget.cc
@@ -49,6 +49,7 @@ SourceOutputWidget* SourceOutputWidget::
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w);
w->init(mainWindow);
+ w->reference();
return w;
}
--- src/sourcewidget.cc.orig 2011-03-10 07:39:25 UTC
+++ src/sourcewidget.cc
@@ -35,6 +35,7 @@ SourceWidget* SourceWidget::create(MainW
Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget");
x->get_widget_derived("deviceWidget", w);
w->init(mainWindow, "source");
+ w->reference();
return w;
}
--- src/streamwidget.cc.orig 2011-03-10 07:39:25 UTC
+++ src/streamwidget.cc
@@ -77,6 +77,7 @@ void StreamWidget::setChannelMap(const p
snprintf(text, sizeof(text), "<b>%s</b>", pa_channel_position_to_pretty_string(m.map[i]));
cw->channelLabel->set_markup(text);
channelsVBox->pack_start(*cw, false, false, 0);
+ cw->unreference();
}
channelWidgets[m.channels-1]->last = true;
channelWidgets[m.channels-1]->setBaseVolume(PA_VOLUME_NORM);

View file

@ -3,4 +3,4 @@ tool ("mixer") for the PulseAudio sound server. In contrast to classic mixer
tools this one allows you to control both the volume of hardware devices and of
each playback stream separately.
WWW: http://0pointer.de/lennart/projects/pavucontrol/
WWW: http://freedesktop.org/software/pulseaudio/pavucontrol/

View file

@ -1,8 +1,8 @@
bin/pavucontrol
share/applications/pavucontrol.desktop
share/doc/pavucontrol/README
share/doc/pavucontrol/README.html
share/doc/pavucontrol/style.css
%%DOCSDIR%%/README
%%DOCSDIR%%/README.html
%%DOCSDIR%%/style.css
share/locale/as/LC_MESSAGES/pavucontrol.mo
share/locale/bn_IN/LC_MESSAGES/pavucontrol.mo
share/locale/ca/LC_MESSAGES/pavucontrol.mo