conky: update to 1.10

This commit is contained in:
gnastyle 2015-07-16 14:19:20 +02:00
parent 94745e8a27
commit 366406612f
5 changed files with 148 additions and 26 deletions

View File

@ -1,39 +1,61 @@
#
# Apps Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas@chakra-project.org
# contribution from Arch https://www.archlinux.org/packages/extra/x86_64/conky/
pkgname=conky
pkgver=1.9.0
pkgrel=2
pkgver=1.10.0
pkgrel=1
pkgdesc="An advanced, highly configurable system monitor for X based on torsmo"
arch=('x86_64')
url="http://conky.sourceforge.net/"
url="https://github.com/brndnmtthws/conky"
license=('custom')
replaces=('torsmo')
depends=('glib2' 'curl' 'lua' 'wireless_tools' 'libxml2' 'libxft' 'libxdamage' 'imlib2')
makedepends=('docbook2x')
makedepends=('cmake' 'docbook2x' 'docbook-xml' 'man-db')
categories=('utils')
backup=(etc/conky/conky.conf etc/conky/conky_no_x11.conf)
source=(http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2)
md5sums=('d3de615f43aadc98d555e05ad9e902c2')
options=('!strip' 'debug')
source=("https://github.com/brndnmtthws/conky/archive/v${pkgver}.tar.gz"
'ascii.patch'
'curl.patch'
'lua53.patch'
'ipv6.patch')
sha512sums=('08664c2c736c078848e4864f7a2df5ed536e683da6aa482cf003c675b03c274802cfd27127adb3d99145fe6c4103cc06046b40322383beafc4ca2e7e811b5caf'
'9298f6fde037af84f5065ae67253c2924a4d3937fdb20e978bfbf14f67085c2a70a02c5ba269356ecdef3cbf144c8eaf4166c389f49a7a3eadb5cec24c852f0a'
'be6c5940d97c206a784a1d3e7db151f0e7ea80e9e142d8ec59d3092d580f3b604dff83f2d06c8ebccb6391d338bf9c77ce6b9c0b119c923a80fc2a8126960f53'
'727b4c93c1bcb80be40b24c3d71ee0cf6839757566848ac50961ea6731b531c6bd18800aec909b19183ef58359f45eab4e117c5a9815ea82842c03eb63b29f0c'
'68fea9bb0ecc40974e94ac88cb4cfaf51db463857495db6c875ca7671668d0f8b69e50276e370551b0cb5034e71eb18a84bab86ffaf9ed2f76673404af2eab55')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -p1 -i ../ascii.patch # db2x_manxml fails on non-ascii chars
# patch -p1 -i ../lua53.patch # lua_gettable returns an int in lua-5.3
patch -p1 -i ../ipv6.patch # https://bugs.archlinux.org/task/45626
patch -p1 -i ../curl.patch # https://github.com/bagder/curl/issues/342
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
CPPFLAGS="${CXXFLAGS}" LIBS="${LDFLAGS}" ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-curl \
--enable-wheather-xoap \
--enable-wlan \
--enable-rss \
--enable-ibm \
--enable-imlib2
make
cd "${srcdir}/${pkgname}-${pkgver}"
cmake \
-D CMAKE_BUILD_TYPE=Release \
-D MAINTAINER_MODE=ON \
-D BUILD_CURL=ON \
-D BUILD_XDBE=ON \
-D BUILD_IMLIB2=ON \
-D BUILD_RSS=ON \
-D BUILD_WEATHER_METAR=ON \
-D BUILD_WEATHER_XOAP=ON \
-D BUILD_WLAN=ON \
-D CMAKE_INSTALL_PREFIX=/usr \
.
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 extras/vim/syntax/conkyrc.vim "${pkgdir}"/usr/share/vim/vimfiles/syntax/conkyrc.vim
install -Dm644 extras/vim/ftdetect/conkyrc.vim "${pkgdir}"/usr/share/vim/vimfiles/ftdetect/conkyrc.vim
}

12
conky/ascii.patch Normal file
View File

@ -0,0 +1,12 @@
diff -aur old/doc/config_settings.xml new/doc/config_settings.xml
--- old/doc/config_settings.xml 2015-06-21 14:49:06.000000000 -1000
+++ new/doc/config_settings.xml 2015-06-29 10:05:00.147318479 -1000
@@ -80,7 +80,7 @@
</term>
<listitem>A comma-separated list of strings to use as the bars of a graph output
to console/shell. The first list item is used for the minimum bar height and the
- last item is used for the maximum. Example: " ,_,▁,▂,▃,▄,▅,▆,▇,█".
+ last item is used for the maximum.
<para /></listitem>
</varlistentry>
<varlistentry>

14
conky/curl.patch Normal file
View File

@ -0,0 +1,14 @@
diff -Naur old/src/ccurl_thread.cc new/src/ccurl_thread.cc
--- old/src/ccurl_thread.cc 2015-06-21 14:49:06.000000000 -1000
+++ new/src/ccurl_thread.cc 2015-07-11 09:11:49.053040998 -1000
@@ -119,9 +119,7 @@
headers.h = curl_slist_append(headers.h, ("If-None-Match: " + etag).c_str());
etag.clear();
}
- if (headers.h) {
- curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers.h);
- }
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers.h);
res = curl_easy_perform(curl);
if (res == CURLE_OK) {

28
conky/ipv6.patch Normal file
View File

@ -0,0 +1,28 @@
From ee08a9e1b045e8d2f4f13a0e60c2f603b66b0d69 Mon Sep 17 00:00:00 2001
From: Marc Payne <marc321@gmail.com>
Date: Mon, 6 Jul 2015 02:51:43 -0600
Subject: [PATCH] Close file only if it was successfully opened
If BUILD_IPV6=ON (default), but the user has disabled ipv6 support
in the kernel using the parameter ipv6.disable=1, then conky fails
to open /proc/net/if_inet6. This leads to a segfault when conky
calls fclose(file) regardless. This fix simply moves the fclose call
into the preceding if statement.
---
src/linux.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/linux.cc b/src/linux.cc
index 847acac..7977fee 100644
--- a/src/linux.cc
+++ b/src/linux.cc
@@ -643,8 +643,8 @@ int update_net_stats(void)
}
lastv6->next = NULL;
}
+ fclose(file);
}
- fclose(file);
#endif /* BUILD_IPV6 */
first = 0;

46
conky/lua53.patch Normal file
View File

@ -0,0 +1,46 @@
diff -aur old/src/luamm.cc new/src/luamm.cc
--- old/src/luamm.cc 2015-06-28 16:38:47.793615922 -1000
+++ new/src/luamm.cc 2015-06-29 09:05:44.646667638 -1000
@@ -165,7 +165,14 @@
}
template<void (*misc)(lua_State *, int), int nresults>
- int safe_misc_trampoline(lua_State *l)
+ int safe_misc_trampoline_set(lua_State *l)
+ {
+ misc(l, 1);
+ return nresults;
+ }
+
+ template<int (*misc)(lua_State *, int), int nresults>
+ int safe_misc_trampoline_get(lua_State *l)
{
misc(l, 1);
return nresults;
@@ -326,7 +333,7 @@
if( rawequal(index1, index2) )
return true;
- return safe_compare(&safe_compare_trampoline<lua_equal>, index1, index2);
+ return safe_compare(&safe_compare_trampoline<&lua_equal>, index1, index2);
}
int state::gc(int what, int data)
@@ -367,7 +374,7 @@
checkstack(2);
pushvalue(index);
insert(-2);
- lua_pushcfunction(cobj.get(), (&safe_misc_trampoline<&lua_gettable, 1>));
+ lua_pushcfunction(cobj.get(), (&safe_misc_trampoline_get<&lua_gettable, 1>));
insert(-3);
call(2, 1, 0);
}
@@ -492,7 +499,7 @@
checkstack(2);
pushvalue(index);
insert(-3);
- lua_pushcfunction(cobj.get(), (&safe_misc_trampoline<&lua_settable, 0>));
+ lua_pushcfunction(cobj.get(), (&safe_misc_trampoline_set<&lua_settable, 0>));
insert(-4);
call(3, 0, 0);
}