aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/conky/APKBUILD56
-rw-r--r--main/conky/conky-1.8.1-secunia-SA43225.patch72
-rw-r--r--main/conky/musl-fixes.patch69
-rw-r--r--main/conky/posix-awk.patch68
4 files changed, 167 insertions, 98 deletions
diff --git a/main/conky/APKBUILD b/main/conky/APKBUILD
index 06bcad8ea0..233304d50d 100644
--- a/main/conky/APKBUILD
+++ b/main/conky/APKBUILD
@@ -1,19 +1,22 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=conky
-pkgver=1.9.0
-pkgrel=1
+pkgver=1.10.0
+pkgrel=0
pkgdesc="An advanced, highly configurable system monitor for X based on torsmo"
url="http://conky.sourceforge.net/"
arch="all"
license="custom"
depends=""
makedepends="alsa-lib-dev libxml2-dev curl-dev wireless-tools-dev
- libxft-dev glib-dev libxdamage-dev libxext-dev imlib2-dev lua-dev
- cairo-dev tolua++ ncurses-dev linux-headers
+ libxft-dev glib-dev libxdamage-dev libxext-dev imlib2-dev lua5.2-dev
+ cairo-dev tolua++ ncurses-dev linux-headers cmake gawk
+ "
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/brndnmtthws/conky/archive/v$pkgver.tar.gz
+ musl-fixes.patch
+ posix-awk.patch
+
"
-subpackages="$pkgname-doc $pkgname-dev"
-source="http://downloads.sourceforge.net/project/conky/conky/$pkgver/conky-$pkgver.tar.bz2
- conky-1.8.1-secunia-SA43225.patch"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
@@ -29,18 +32,17 @@ prepare() {
build() {
cd "$_builddir"
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --enable-wlan \
- --enable-rss \
- --enable-ibm \
- --enable-imlib2 \
- --enable-lua \
- --enable-lua-cairo \
- --enable-lua-imlib2 \
+ cmake . \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_CURL=ON \
+ -DBUILD_XDBE=ON \
+ -DBUILD_IMLIB2=ON \
+ -DBUILD_RSS=ON \
+ -DBUILD_WEATHER_METAR=ON \
+ -DBUILD_WEATHER_XOAP=ON \
+ -DBUILD_WLAN=ON \
+ -DBUILD_I18N=OFF \
|| return 1
make || return 1
}
@@ -49,12 +51,14 @@ package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
- rm "$pkgdir"/usr/lib/conky/*.la
}
-md5sums="d3de615f43aadc98d555e05ad9e902c2 conky-1.9.0.tar.bz2
-e00e00b1e4dd77536f8caed7a2b851c1 conky-1.8.1-secunia-SA43225.patch"
-sha256sums="baf1b550f135fbfb53e5e286a33aadc03a667d63bf6c4d52ba7637366295bb6f conky-1.9.0.tar.bz2
-b90aebf0414a3335a466ccef2a3d6b1a9692f8f262a17d00b2b5555649acc26a conky-1.8.1-secunia-SA43225.patch"
-sha512sums="98c9f69fd8bee2062e3eddeb7a394cce932199ffd6c8664006d1222f0453569406613e63637848c77a455f7dae3f16be3079a2cab56ecafea51ec043de23c889 conky-1.9.0.tar.bz2
-13c115d1ec47f04e36764631cc4e1eca6fa9ddc49ac447e380d9b26b6c4b16c7257b1bbe3f5a075c1fd1e04801ef5c257bc35cc9800b67bdf1af1c814656c0c0 conky-1.8.1-secunia-SA43225.patch"
+md5sums="cdc0298e5f257829d574ae8114170d9b conky-1.10.0.tar.gz
+033686de05697157dbd04f08f7b7eb03 musl-fixes.patch
+a2b1463fe06741f1e0707e130eb57700 posix-awk.patch"
+sha256sums="f392f3f91fcc37f04ff65d53957512e4d81b7b9b36394acb5ecaefe92623f8eb conky-1.10.0.tar.gz
+5f5d7b0aaed99199ccc628d482b30ccce228e15fa4f9794bf01dda9a05587691 musl-fixes.patch
+c23d2df3c0250162ce16cb718fe4c87e171bc58baf29ad8898df5387888f1718 posix-awk.patch"
+sha512sums="08664c2c736c078848e4864f7a2df5ed536e683da6aa482cf003c675b03c274802cfd27127adb3d99145fe6c4103cc06046b40322383beafc4ca2e7e811b5caf conky-1.10.0.tar.gz
+8753e171d143cfcd4e34187d3edbe6b1d92846319c9732931dd9addd1c9da65d88e7318dc49244db08462100cf527e1a07ddd3e005d669c551460cbfaff19ed4 musl-fixes.patch
+7508ddbfa0610d54a030563bd173ec496d5a0279cab410308e15adc558416d14ff322687bd88d5a7b76d17d8d948e117993d655790a4cc6bb3650ab4ba530f9f posix-awk.patch"
diff --git a/main/conky/conky-1.8.1-secunia-SA43225.patch b/main/conky/conky-1.8.1-secunia-SA43225.patch
deleted file mode 100644
index cac4b2c08b..0000000000
--- a/main/conky/conky-1.8.1-secunia-SA43225.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- ./src/eve.c 2011-02-12 13:26:34.636269667 +0100
-+++ ./src/eve.c 2011-02-12 13:26:48.242936334 +0100
-@@ -254,19 +254,6 @@
- }
- }
-
--static int file_exists(const char *filename)
--{
-- struct stat fi;
--
-- if ((stat(filename, &fi)) == 0) {
-- if (fi.st_size > 0)
-- return 1;
-- else
-- return 0;
-- } else
-- return 0;
--}
--
- static void writeSkilltree(char *content, const char *filename)
- {
- FILE *fp = fopen(filename, "w");
-@@ -283,13 +270,12 @@
- xmlDocPtr doc = 0;
- xmlNodePtr root = 0;
-
-- if (!file_exists(file)) {
-- skilltree = getXmlFromAPI(NULL, NULL, NULL, EVEURL_SKILLTREE);
-- writeSkilltree(skilltree, file);
-- free(skilltree);
-- }
-+ skilltree = getXmlFromAPI(NULL, NULL, NULL, EVEURL_SKILLTREE);
-+ writeSkilltree(skilltree, file);
-+ free(skilltree);
-
- doc = xmlReadFile(file, NULL, 0);
-+ unlink(file);
- if (!doc)
- return NULL;
-
-@@ -340,7 +326,7 @@
- static char *eve(char *userid, char *apikey, char *charid)
- {
- Character *chr = NULL;
-- const char *skillfile = "/tmp/.cesf";
-+ char skillfile[] = "/tmp/.cesfXXXXXX";
- int i = 0;
- char *output = 0;
- char *timel = 0;
-@@ -348,6 +334,7 @@
- char *content = 0;
- time_t now = 0;
- char *error = 0;
-+ int tmp_fd, old_umask;
-
-
- for (i = 0; i < MAXCHARS; i++) {
-@@ -400,6 +387,14 @@
-
- output = (char *)malloc(200 * sizeof(char));
- timel = formatTime(&chr->ends);
-+ old_umask = umask(0066);
-+ tmp_fd = mkstemp(skillfile);
-+ umask(old_umask);
-+ if (tmp_fd == -1) {
-+ error = strdup("Cannot create temporary file");
-+ return error;
-+ }
-+ close(tmp_fd);
- skill = getSkillname(skillfile, chr->skill);
-
- chr->skillname = strdup(skill);
diff --git a/main/conky/musl-fixes.patch b/main/conky/musl-fixes.patch
new file mode 100644
index 0000000000..4891f32785
--- /dev/null
+++ b/main/conky/musl-fixes.patch
@@ -0,0 +1,69 @@
+From 21b0a052af22a355321cce13abd573dbcf90dd4a Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 23 Jul 2015 13:57:18 +0200
+Subject: [PATCH 2/3] Remove use of sysctl.h
+
+---
+ src/common.cc | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/common.cc b/src/common.cc
+index 126f30a..116cd06 100644
+--- a/src/common.cc
++++ b/src/common.cc
+@@ -42,7 +42,6 @@
+ #include <errno.h>
+ #include <time.h>
+ #include <sys/ioctl.h>
+-#include <sys/sysctl.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <pthread.h>
+--
+2.4.6
+
+
+From 3d67ed4920d31e5b17dd61684713d061d4fd7598 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 23 Jul 2015 13:58:02 +0200
+Subject: [PATCH 3/3] Use portable version of strerror_r
+
+---
+ src/c++wrap.cc | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/c++wrap.cc b/src/c++wrap.cc
+index c21b473..213f9c4 100644
+--- a/src/c++wrap.cc
++++ b/src/c++wrap.cc
+@@ -26,8 +26,14 @@
+ #include "c++wrap.hh"
+
+ #include <unistd.h>
++
++/* force use of POSIX strerror_r instead of non-portable GNU specific */
++#ifdef _GNU_SOURCE
++#undef _GNU_SOURCE
++#endif
+ #include <string.h>
+
++
+ #if !defined(HAVE_PIPE2) || !defined(HAVE_O_CLOEXEC)
+ #include <fcntl.h>
+
+@@ -62,8 +68,10 @@ namespace {
+
+ std::string strerror_r(int errnum)
+ {
+- char buf[100];
+- return strerror_r(errnum, buf, sizeof buf);
++ static thread_local char buf[100];
++ if (strerror_r(errnum, buf, sizeof buf) != 0)
++ snprintf(buf, sizeof buf, "Unknown error %i", errnum);
++ return buf;
+ }
+
+ std::pair<int, int> pipe2(int flags)
+--
+2.4.6
+
diff --git a/main/conky/posix-awk.patch b/main/conky/posix-awk.patch
new file mode 100644
index 0000000000..722eaaa526
--- /dev/null
+++ b/main/conky/posix-awk.patch
@@ -0,0 +1,68 @@
+From f9c14e3b78a9a4659eac124b79076ff91ffeb90f Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 23 Jul 2015 13:15:58 +0200
+Subject: [PATCH 1/3] Use posix awk instead of GNU awk
+
+---
+ cmake/Conky.cmake | 10 +++++-----
+ cmake/ConkyCPackSetup.cmake | 2 +-
+ cmake/ConkyPlatformChecks.cmake | 2 +-
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/cmake/Conky.cmake b/cmake/Conky.cmake
+index b9605de..d9fd150 100644
+--- a/cmake/Conky.cmake
++++ b/cmake/Conky.cmake
+@@ -71,10 +71,10 @@ set(VERSION_MAJOR "1")
+ set(VERSION_MINOR "10")
+ set(VERSION_PATCH "1")
+
+-find_program(APP_GAWK gawk)
+-if(NOT APP_GAWK)
+- message(FATAL_ERROR "Unable to find program 'gawk'")
+-endif(NOT APP_GAWK)
++find_program(APP_AWK awk)
++if(NOT APP_AWK)
++ message(FATAL_ERROR "Unable to find program 'awk'")
++endif(NOT APP_AWK)
+
+ find_program(APP_WC wc)
+ if(NOT APP_WC)
+@@ -99,7 +99,7 @@ if(NOT RELEASE)
+ mark_as_advanced(APP_GIT)
+ endif(NOT RELEASE)
+
+-mark_as_advanced(APP_GAWK APP_WC APP_DATE APP_UNAME)
++mark_as_advanced(APP_AWK APP_WC APP_DATE APP_UNAME)
+
+ #BUILD_DATE=$(LANG=en_US LC_ALL=en_US LOCALE=en_US date)
+ #BUILD_ARCH="$(uname -sr) ($(uname -m))"
+diff --git a/cmake/ConkyCPackSetup.cmake b/cmake/ConkyCPackSetup.cmake
+index a568922..c1046ef 100644
+--- a/cmake/ConkyCPackSetup.cmake
++++ b/cmake/ConkyCPackSetup.cmake
+@@ -44,7 +44,7 @@ endif(CPACK_GENERATOR MATCHES "NSIS")
+ # Source package setup. Compile with "make package_source".
+ set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION}-src")
+ set(CPACK_SOURCE_GENERATOR "TBZ2")
+-execute_process(COMMAND ${APP_UNAME} COMMAND ${APP_GAWK} "{print $1}"
++execute_process(COMMAND ${APP_UNAME} COMMAND ${APP_AWK} "{print $1}"
+ RESULT_VARIABLE RETVAL OUTPUT_VARIABLE CPU_ARCH
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake
+index ca520ed..a2ebafc 100644
+--- a/cmake/ConkyPlatformChecks.cmake
++++ b/cmake/ConkyPlatformChecks.cmake
+@@ -422,6 +422,6 @@ if(DEBUG)
+ execute_process(COMMAND
+ ${APP_GIT} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git log
+ --since=${VERSION_MAJOR}-${VERSION_MINOR}-01 --pretty=oneline COMMAND
+- ${APP_WC} -l COMMAND ${APP_GAWK} "{print $1}" RESULT_VARIABLE RETVAL
++ ${APP_WC} -l COMMAND ${APP_AWK} "{print $1}" RESULT_VARIABLE RETVAL
+ OUTPUT_VARIABLE COMMIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE)
+ endif(DEBUG)
+--
+2.4.6
+
+