summaryrefslogtreecommitdiff
path: root/pcr-testing/wbar
diff options
context:
space:
mode:
Diffstat (limited to 'pcr-testing/wbar')
-rw-r--r--pcr-testing/wbar/PKGBUILD30
-rw-r--r--pcr-testing/wbar/remove_static_iterator.patch65
2 files changed, 86 insertions, 9 deletions
diff --git a/pcr-testing/wbar/PKGBUILD b/pcr-testing/wbar/PKGBUILD
index ec8ee3f46..4c544f292 100644
--- a/pcr-testing/wbar/PKGBUILD
+++ b/pcr-testing/wbar/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=wbar
pkgver=2.3.4
-pkgrel=3
+pkgrel=4
pkgdesc="Minimalist quick-launch tool"
arch=('i686' 'x86_64')
license=('GPL')
@@ -13,15 +13,18 @@ depends=('imlib2')
makedepends=('intltool' 'libglade')
source=(https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wbar/wbar-2.3.4.tgz
- wbar-dock.png)
+ wbar-dock.png
+ remove_static_iterator.patch)
sha256sums=('46a69849e4436529aefb5cfb2c94b520d05a53c237e7773b90207f67f97a93e3'
- '902dbf06f596bf4453e60b5caa5f173cfc2644dd054e27b50b7e028d0968edd0')
+ '902dbf06f596bf4453e60b5caa5f173cfc2644dd054e27b50b7e028d0968edd0'
+ 'c43d40965ef191ea41a4ee87ad71b7cc7459470f48424e2b82de0d67a8965b65')
_build_dir=${pkgname}-${pkgver}
-prepare() {
- cd ${_build_dir}
+prepare()
+{
+ cd ${srcdir}/${_build_dir}
sed -i 's|AM_INIT_AUTOMAKE(\[\(.*\)\])|AM_INIT_AUTOMAKE(\[\1subdir-objects \])|' ./configure.ac
sed -i 's|\$(top_srcdir)/src/||g' ./src/Makefile.am
@@ -29,18 +32,27 @@ prepare() {
sed -i 's|= PACKAGE_NAME" "DEFAULT_ARGV;|= PACKAGE_NAME " " DEFAULT_ARGV;|' ./src/config/Functions.cc
sed -i 's|("killall "PACKAGE_NAME)|("killall " PACKAGE_NAME)|' ./src/config/Run.cc
sed -i 's| PIXMAPDIR"/"PACKAGE_NAME"| PIXMAPDIR "/" PACKAGE_NAME "|' ./src/config/Functions.cc
+
+ # FIXME
+ # /usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h:65:8: error: unnecessary parentheses in declaration of ‘__gtk_reserved7’ [-Werror=parentheses]
+ # /usr/include/gtk-2.0/gtk/gtkstatusicon.h:76:8: error: unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Werror=parentheses]
+ sed -i 's|-Werror \\|-Werror -Wno-error=parentheses \\|' ./src/Makefile.am
+
+ patch -p1 < ${srcdir}/remove_static_iterator.patch
}
-build() {
- cd ${_build_dir}
+build()
+{
+ cd ${srcdir}/${_build_dir}
autoreconf -fiv
./configure
make
}
-package() {
- cd ${_build_dir}
+package()
+{
+ cd ${srcdir}/${_build_dir}
make DESTDIR=${pkgdir} install
diff --git a/pcr-testing/wbar/remove_static_iterator.patch b/pcr-testing/wbar/remove_static_iterator.patch
new file mode 100644
index 000000000..574c6775b
--- /dev/null
+++ b/pcr-testing/wbar/remove_static_iterator.patch
@@ -0,0 +1,65 @@
+diff --git a/src/core/Main.cc b/src/core/Main.cc
+index c170e63..b6fa5f1 100644
+--- a/src/core/Main.cc
++++ b/src/core/Main.cc
+@@ -18,7 +18,6 @@
+ static size_t configitems;
+ static unsigned int taskbar;
+ static std::list<App *> list;
+-static std::list<App *>::iterator it;
+ static App *p;
+
+ static Bar *barra;
+@@ -69,8 +68,7 @@ int main(int argc, char **argv)
+
+ if (list.size() != 0)
+ {
+- it = list.begin();
+- p = (*it);
++ p = *list.begin();
+ }
+ else
+ {
+@@ -440,7 +438,6 @@ int mapIcons()
+ {
+ list.pop_back();
+ ((SuperBar *)barra)->removeIcon();
+- it--;
+ }
+ // add currently running tasks to the list
+ if ( (taskbar) &&
+@@ -481,15 +478,17 @@ int mapIcons()
+ }
+ }
+ }
+- //if this is not an initial run
+- if (!firstrun)
+- // and we added no windows
+- if ((size_t)list.size() == configitems)
+- //then there is no need to add icons
++
++ // if this is not an initial run and we added no windows
++ // then there is no need to add icons
++ if (!firstrun && (size_t)list.size() == configitems)
+ return 0;
+- for (it++; it != list.end(); it++)
++
++ std::list<App *>::iterator appsIt = list.begin();
++ while ((size_t)std::distance(list.begin(), ++appsIt) < configitems);
++ while (++appsIt != list.end())
+ {
+- p = (*it);
++ p = *appsIt;
+ try
+ {
+ if (p->getIconName() != "")
+@@ -518,8 +517,7 @@ int mapIcons()
+ }
+ (void) XSetErrorHandler(oldXHandler);
+ barra->scale();
+- if (firstrun)
+- it--;
++
+ return 0;
+ }
+