- Update conky to 1.11.1

- Silence some portlint warnings
This commit is contained in:
Guido Falsi
2019-01-07 23:27:11 +00:00
parent b329570455
commit 9ddf0e55f6
9 changed files with 117 additions and 134 deletions

View File

@@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= conky
PORTVERSION= 1.10.8
PORTVERSION= 1.11.1
DISTVERSIONPREFIX= v
PORTREVISION= 3
CATEGORIES= sysutils
MAINTAINER= madpilot@FreeBSD.org
@@ -16,17 +15,17 @@ BUILD_DEPENDS= db2x_xsltproc:textproc/docbook2X \
docbook-xsl>=0:textproc/docbook-xsl \
xsltproc:textproc/libxslt
CONFLICTS?= conky-awesome-[0-9]*
SLAVEDIRS= sysutils/conky-awesome
USES= cpe cmake:noninja compiler:c++11-lib gettext-runtime iconv \
localbase lua:51 pkgconfig tar:bzip2
CMAKE_ARGS+= -DBUILD_PORT_MONITORS:BOOL=false \
-DBUILD_IBM:BOOL=false \
-DBUILD_HDDTEMP:BOOL=false \
-DBUILD_IOSTATS:BOOL=false \
-DBUILD_AUDACIOUS:BOOL=false
CONFLICTS?= conky-awesome-[0-9]*
SLAVEDIRS= sysutils/conky-awesome
PLIST_FILES= bin/conky man/man1/conky.1.gz
PORTEXAMPLES= conky.conf conky_no_x11.conf convert.lua
PORTDOCS= html/config_settings.html html/docs.html html/lua.html html/variables.html

View File

@@ -1,3 +1,3 @@
TIMESTAMP = 1518106982
SHA256 (brndnmtthws-conky-v1.10.8_GH0.tar.gz) = 2ebd655a27c816bd613538b71d4ec1c096252cb522feaa05f64781dcedea8857
SIZE (brndnmtthws-conky-v1.10.8_GH0.tar.gz) = 373075
TIMESTAMP = 1545078509
SHA256 (brndnmtthws-conky-v1.11.1_GH0.tar.gz) = 71fab859946cc2e67be46f2db53859c66369c5c87acf18fc8dfbd41b114f6d6e
SIZE (brndnmtthws-conky-v1.11.1_GH0.tar.gz) = 1091759

View File

@@ -1,16 +1,15 @@
--- CMakeLists.txt.orig 2016-07-20 16:53:48 UTC
--- CMakeLists.txt.orig 2018-12-02 18:26:02 UTC
+++ CMakeLists.txt
@@ -50,23 +50,25 @@ add_subdirectory(doc)
@@ -54,26 +54,27 @@ add_subdirectory(doc)
add_subdirectory(src)
IF(NOT DEFINED DOC_PATH)
- set(DOC_PATH "share/doc/${CPACK_PACKAGE_NAME}-${VERSION}")
+ set(DOC_PATH "share/doc/${CPACK_PACKAGE_NAME}")
- set(DOC_PATH "share/doc/${CPACK_PACKAGE_NAME}-${VERSION}")
+ set(DOC_PATH "share/doc/${CPACK_PACKAGE_NAME}")
ENDIF(NOT DEFINED DOC_PATH)
-set(DOC_FILES extras/convert.lua data/conky_no_x11.conf data/conky.conf)
+
+IF(NOT DEFINED SAMPLE_PATH)
+ set(SAMPLE_PATH "share/examples/${CPACK_PACKAGE_NAME}")
+ set(SAMPLE_PATH "share/examples/${CPACK_PACKAGE_NAME}")
+ENDIF(NOT DEFINED SAMPLE_PATH)
+set(SAMPLE_FILES extras/convert.lua data/conky_no_x11.conf data/conky.conf)
@@ -22,18 +21,21 @@
set(MAN_FILES doc/conky.1)
-install(FILES ${DOC_FILES}
- DESTINATION ${DOC_PATH})
- DESTINATION ${DOC_PATH})
+install(FILES ${SAMPLE_FILES}
+ DESTINATION ${SAMPLE_PATH})
+ DESTINATION ${SAMPLE_PATH})
-if(MAINTAINER_MODE)
- install(FILES ${HTML_FILES}
- DESTINATION ${HTML_PATH})
- install(FILES ${HTML_FILES}
- DESTINATION ${HTML_PATH})
+install(FILES ${HTML_FILES}
+ DESTINATION ${HTML_PATH})
+ DESTINATION ${HTML_PATH})
- install(FILES ${MAN_FILES}
- DESTINATION ${MAN_PATH})
- install(FILES ${MAN_FILES}
- DESTINATION ${MAN_PATH})
-endif(MAINTAINER_MODE)
+install(FILES ${MAN_FILES}
+ DESTINATION ${MAN_PATH})
+ DESTINATION ${MAN_PATH})
if(CHECK_CODE_QUALITY)
# Set up clang-tidy

View File

@@ -1,30 +0,0 @@
diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake
index 334b4690..ce5c109b 100644
--- cmake/ConkyPlatformChecks.cmake
+++ cmake/ConkyPlatformChecks.cmake
@@ -30,8 +30,6 @@ check_include_files(sys/statfs.h HAVE_SYS_STATFS_H)
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H)
check_include_files(dirent.h HAVE_DIRENT_H)
-check_include_files("soundcard.h;sys/soundcard.h;linux/soundcard.h" HAVE_SOME_SOUNDCARD_H)
-check_include_files("linux/soundcard.h" HAVE_LINUX_SOUNDCARD_H)
# Check for some functions
check_function_exists(strndup HAVE_STRNDUP)
@@ -88,6 +86,16 @@ if(NOT OS_LINUX AND NOT OS_FREEBSD AND NOT OS_OPENBSD AND NOT OS_DRAGONFLY
endif(NOT OS_LINUX AND NOT OS_FREEBSD AND NOT OS_OPENBSD AND NOT OS_DRAGONFLY
AND NOT OS_SOLARIS AND NOT OS_HAIKU)
+# Check for soundcard header
+if(OS_LINUX)
+ check_include_files("linux/soundcard.h" HAVE_SOME_SOUNDCARD_H)
+ check_include_files("linux/soundcard.h" HAVE_LINUX_SOUNDCARD_H)
+elseif(OS_OPENBSD)
+ check_include_files("soundcard.h" HAVE_SOME_SOUNDCARD_H)
+else(OS_LINUX)
+ check_include_files("sys/soundcard.h" HAVE_SOME_SOUNDCARD_H)
+endif(OS_LINUX)
+
if(BUILD_I18N AND OS_DRAGONFLY)
set(conky_libs ${conky_libs} -lintl)
endif(BUILD_I18N AND OS_DRAGONFLY)

View File

@@ -1,18 +1,29 @@
--- src/bsdapm.cc.orig 2016-10-04 07:49:19 UTC
--- src/bsdapm.cc.orig 2018-12-16 17:16:51 UTC
+++ src/bsdapm.cc
@@ -27,6 +27,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
+#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
+ || defined(__DragonFly__) \
+ || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
#include "config.h"
#include "conky.h"
#include "text_object.h"
@@ -208,3 +212,4 @@ void print_apm_battery_time(struct text_
}
#endif
@@ -61,7 +61,7 @@ static int apm_getinfo(int fd, apm_info_t aip) {
return 0;
}
+#endif
-void print_apm_adapter(struct text_object *obj, char *p, int p_max_size) {
+void print_apm_adapter(struct text_object *obj, char *p, unsigned int p_max_size) {
int fd;
const char *out;
#ifdef __OpenBSD__
@@ -109,7 +109,7 @@ void print_apm_adapter(struct text_object *obj, char *
snprintf(p, p_max_size, "%s", out);
}
-void print_apm_battery_life(struct text_object *obj, char *p, int p_max_size) {
+void print_apm_battery_life(struct text_object *obj, char *p, unsigned int p_max_size) {
int fd;
u_int batt_life;
const char *out;
@@ -150,7 +150,7 @@ void print_apm_battery_life(struct text_object *obj, c
snprintf(p, p_max_size, "%s", out);
}
-void print_apm_battery_time(struct text_object *obj, char *p, int p_max_size) {
+void print_apm_battery_time(struct text_object *obj, char *p, unsigned int p_max_size) {
int fd;
int batt_time;
#ifdef __OpenBSD__

View File

@@ -0,0 +1,14 @@
--- src/bsdapm.h.orig 2018-12-02 18:26:02 UTC
+++ src/bsdapm.h
@@ -29,8 +29,8 @@
#ifndef _BSDAPM_H
#define _BSDAPM_H
-void print_apm_adapter(struct text_object *, char *, int);
-void print_apm_battery_life(struct text_object *, char *, int);
-void print_apm_battery_time(struct text_object *, char *, int);
+void print_apm_adapter(struct text_object *, char *, unsigned int);
+void print_apm_battery_life(struct text_object *, char *, unsigned int);
+void print_apm_battery_time(struct text_object *, char *, unsigned int);
#endif /* _BSDAPM_H */

View File

@@ -1,23 +1,11 @@
--- src/freebsd.cc.orig 2018-11-28 18:50:47 UTC
--- src/freebsd.cc.orig 2018-12-16 17:16:51 UTC
+++ src/freebsd.cc
@@ -78,7 +78,7 @@ std::mutex kvm_proc_mutex;
__attribute__((gnu_inline)) inline void
proc_find_top(struct process **cpu, struct process **mem, struct process **time);
@@ -254,6 +254,8 @@ int update_total_processes(void) {
kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
-static short cpu_setup = 0;
+static short conky_cpu_setup = 0;
info.procs = n_processes;
+
+ return 0;
}
static int getsysctl(const char *name, void *ptr, size_t len)
{
@@ -338,9 +338,9 @@ int update_cpu_usage(void)
extern void* global_cpu;
/* add check for !info.cpu_usage since that mem is freed on a SIGUSR1 */
- if ((cpu_setup == 0) || (!info.cpu_usage)) {
+ if ((conky_cpu_setup == 0) || (!info.cpu_usage)) {
get_cpu_count();
- cpu_setup = 1;
+ conky_cpu_setup = 1;
}
if (!global_cpu) {
int update_running_processes(void) {

View File

@@ -1,39 +1,38 @@
--- src/luamm.cc.orig 2016-10-04 07:49:19 UTC
--- src/luamm.cc.orig 2018-12-02 18:26:02 UTC
+++ src/luamm.cc
@@ -57,7 +57,8 @@ namespace lua {
lua_pushstring(l, e.what());
}
catch(...) {
- lua_pushstring(l, ptr->__cxa_exception_type()->name());
+// lua_pushstring(l, ptr->__cxa_exception_type()->name());
+ lua_pushstring(l, "Unknown exception");
}
return 1;
}
@@ -344,7 +345,7 @@ namespace lua {
pushinteger(what);
pushinteger(data);
call(2, 1, 0);
- assert(isnumber(-1));
+ assert(isanumber(-1));
int r = tointeger(-1);
pop();
return r;
@@ -427,7 +428,7 @@ namespace lua {
@@ -56,7 +56,7 @@ int exception_to_string(lua_State *l) {
} catch (std::exception &e) {
lua_pushstring(l, e.what());
} catch (...) {
-#if defined(__APPLE__) && defined(__MACH__)
+#if (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__)
// lua_pushstring(l, ptr->__cxa_exception_type()->name());
printf(
"%s: FIXME: no member named '__cxa_exception_type' in "
@@ -345,7 +345,7 @@ int state::gc(int what, int data) {
pushinteger(what);
pushinteger(data);
call(2, 1, 0);
- assert(isnumber(-1));
+ assert(isanumber(-1));
int r = tointeger(-1);
pop();
return r;
@@ -420,7 +420,7 @@ bool state::next(int index) {
call(2, MULTRET, 0);
call(2, MULTRET, 0);
- assert(isnumber(-1));
+ assert(isanumber(-1));
int r = tointeger(-1);
pop();
return r;
@@ -466,7 +467,7 @@ namespace lua {
pushvalue(index1);
pushvalue(index2);
call(2, 1, 0);
- assert(isnumber(-1));
+ assert(isanumber(-1));
int r = tointeger(-1);
pop();
return r;
- assert(isnumber(-1));
+ assert(isanumber(-1));
int r = tointeger(-1);
pop();
return r != 0;
@@ -460,7 +460,7 @@ bool state::safe_compare(lua_CFunction trampoline, int
pushvalue(index1);
pushvalue(index2);
call(2, 1, 0);
- assert(isnumber(-1));
+ assert(isanumber(-1));
int r = tointeger(-1);
pop();
return r != 0;

View File

@@ -1,11 +1,11 @@
--- src/luamm.hh.orig 2016-10-04 07:49:19 UTC
--- src/luamm.hh.orig 2018-12-02 18:26:02 UTC
+++ src/luamm.hh
@@ -212,7 +212,7 @@ namespace lua {
bool islightuserdata(int index) throw() { return lua_islightuserdata(cobj.get(), index); }
bool isnil(int index) throw() { return lua_isnil(cobj.get(), index); }
bool isnone(int index) throw() { return lua_isnone(cobj.get(), index); }
- bool isnumber(int index) throw() { return lua_isnumber(cobj.get(), index); }
+ bool isanumber(int index) throw() { return lua_isnumber(cobj.get(), index); }
bool isstring(int index) throw() { return lua_isstring(cobj.get(), index); }
void pop(int n = 1) throw() { lua_pop(cobj.get(), n); }
void pushboolean(bool b) throw() { lua_pushboolean(cobj.get(), b); }
@@ -204,7 +204,7 @@ class state : private std::mutex {
}
bool isnil(int index) throw() { return lua_isnil(cobj.get(), index); }
bool isnone(int index) throw() { return lua_isnone(cobj.get(), index); }
- bool isnumber(int index) throw() { return lua_isnumber(cobj.get(), index); }
+ bool isanumber(int index) throw() { return lua_isnumber(cobj.get(), index); }
bool isstring(int index) throw() { return lua_isstring(cobj.get(), index); }
void pop(int n = 1) throw() { lua_pop(cobj.get(), n); }
void pushboolean(bool b) throw() { lua_pushboolean(cobj.get(), b); }