From nobody Thu Oct 13 18:24:09 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MpHwT3nb5z4fLVZ; Thu, 13 Oct 2022 18:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MpHwT2jktz3vVY; Thu, 13 Oct 2022 18:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665685449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PmxSJ1+4vFYDHXPE8IUO42tx5FZXIUMk16GNlmTmM2Q=; b=mWVziD09l/D0wwxMvZhBPB4SOJFUO/+g3gExurFxPMrfI0wlLI9QZNPcCBXRk5QHg8kQSi +P3Y7Ciwu01UrLw8XgsK5/49YpLka0U3i2wI10khUnvFjE1S7IdFJryaGjRnNskJFpf9JV 4Tzr6jVTbPmGXuQqb8SCGvjezAtWBABApdYFQesnSf8oxFVHv8EbeEp+ZcqLY+YMdRNclb WNsCufCPgndhEnyAO+lcciPXZrlUQTQBx4hRCp3eEIQgRS+jND+Mr8gjqeVvW5G8AG+Z6Y pHB8JzrXeTecbsz0bbFqDd5liizIxb+DZOR3Be28s+iYg4dOavgywHWVEulY9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MpHwT1nXhzWYq; Thu, 13 Oct 2022 18:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29DIO9Rw022531; Thu, 13 Oct 2022 18:24:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29DIO985022530; Thu, 13 Oct 2022 18:24:09 GMT (envelope-from git) Date: Thu, 13 Oct 2022 18:24:09 GMT Message-Id: <202210131824.29DIO985022530@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Guido Falsi Subject: git: cf75f452e94a - main - sysutils/conky: Update to 1.14.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: madpilot X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf75f452e94a2eb6da98eabc5b9e002f138e4051 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665685449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PmxSJ1+4vFYDHXPE8IUO42tx5FZXIUMk16GNlmTmM2Q=; b=xVI4mQIo4EaHgX92T2HV5JtTTup/G/JzyXYMuVqdCb9WjwWxqgBpFLnNKghz/lVdffHoIV Tj5muE1WlMT9HW9gaR4grMwb5+br8hM1qXQ9kBqcjihL5j+bpiUXczLdwFeXPuLxwmel2u v+bFeEh0vTmj0LZJ9/1HmTgarysIUNpC5BKj4EgbGOhsb5fFOYH0RjijUmPyddLJL5Ntip VXqTnABBhC//50yHprhJ1jwp9SORMkhOQ0IfsbAUWGjf3wi24THufn92aZeXfKWaLzkru6 i24ghEP19oemmuYMvWWWC1ssEV6OxzpKGyqHdS/TApO+FY4wxC0lDIF13JBRCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665685449; a=rsa-sha256; cv=none; b=oH5PoqIqx67vWGoymCQSv83WMgsY5boUWdMIGvAUHpu0t/3TN8Kw520BEwM380N69++4sN gKwdtttAqe1zXOH5NDC/1mzEEh1UZxSZfwHCFHjI5ct0T1KxsClSgXpFk1hJQ+G7hZEl5g gz6Cn6ClWsTpTgNM1HTE/iPVUX+CLrtG0ZheTVXUayxwITfKw55xzAv/b90q5XWsrDIwyX YMvnzaQ9aE3jp/+xhimzQzvBUKgTv4Vrt7dD/UuhfRhgR+0IvnEVTagbjo7Mg6zsApxDpe 4Vd3YEkiQ9Jqq81RAaYf7hRe5OMspznlhE14DMA/Fm+ZyKj0+ZM8BuvHHvo+Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/ports/commit/?id=cf75f452e94a2eb6da98eabc5b9e002f138e4051 commit cf75f452e94a2eb6da98eabc5b9e002f138e4051 Author: Guido Falsi AuthorDate: 2022-10-13 18:22:58 +0000 Commit: Guido Falsi CommitDate: 2022-10-13 18:22:58 +0000 sysutils/conky: Update to 1.14.0 - Add patch implementing missing function for FreeBSD, already proposed upstream: https://github.com/brndnmtthws/conky/pull/1252 - Updated dependencies, upstream changed its documentation build method Old html documentation has been removed, the information is now encoded in yaml files. Upstream code does not provide a method to automatically produce human readable documentation from the yaml files, so I install those directly in PORTDOCS. --- sysutils/conky/Makefile | 24 +++++++++--------- sysutils/conky/distinfo | 6 ++--- sysutils/conky/files/patch-CMakeLists.txt | 18 +++----------- sysutils/conky/files/patch-doc_CMakeLists.txt | 11 +++++++++ sysutils/conky/files/patch-doc_docgen.sh | 13 ---------- sysutils/conky/files/patch-src_display-console.cc | 16 ------------ sysutils/conky/files/patch-src_freebsd.cc | 30 +++++++++++++++++++++++ 7 files changed, 61 insertions(+), 57 deletions(-) diff --git a/sysutils/conky/Makefile b/sysutils/conky/Makefile index 8921bf37c4b5..74c9a4df4102 100644 --- a/sysutils/conky/Makefile +++ b/sysutils/conky/Makefile @@ -1,5 +1,5 @@ PORTNAME= conky -PORTVERSION= 1.13.1 +PORTVERSION= 1.14.0 DISTVERSIONPREFIX= v CATEGORIES= sysutils @@ -8,13 +8,13 @@ COMMENT?= Advanced, highly configurable system monitor for X11 WWW= https://github.com/brndnmtthws/conky LIB_DEPENDS= libinotify.so:devel/libinotify -BUILD_DEPENDS= db2x_xsltproc:textproc/docbook2X \ - docbook-xsl>=0:textproc/docbook-xsl \ - xsltproc:textproc/libxslt \ - gsed:textproc/gsed +BUILD_DEPENDS= gsed:textproc/gsed \ + pandoc:textproc/hs-pandoc \ + ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} USES= cpe cmake:noninja compiler:c++11-lib gettext-runtime iconv \ - localbase lua:52-53 pkgconfig tar:bzip2 + localbase lua:52-53 pkgconfig python:3.7+,build tar:bzip2 CMAKE_ARGS= -DBUILD_PORT_MONITORS:BOOL=false \ -DBUILD_IBM:BOOL=false \ @@ -28,7 +28,7 @@ CONFLICTS?= conky-awesome 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 +PORTDOCS= config_settings.yaml variables.yaml lua.yaml USE_GITHUB= yes GH_ACCOUNT= brndnmtthws @@ -57,6 +57,7 @@ DOUBLE_BUFFER_IMPLIES= X11 IMLIB2_CMAKE_BOOL= BUILD_IMLIB2 IMLIB2_LIB_DEPENDS= libImlib2.so:graphics/imlib2 IMLIB2_IMPLIES= X11 +IMLIB2_USE= xorg=ice,sm IPV6_CMAKE_BOOL= BUILD_IPV6 @@ -137,8 +138,6 @@ post-patch: @${REINPLACE_CMD} -e 's,^set(INCLUDE_SEARCH_PATH \(.*\)),set(INCLUDE_SEARCH_PATH \1 ${LUA_INCDIR}),' \ -e 's/ -lbsd/ -lintl -linotify/' \ ${WRKSRC}/cmake/ConkyPlatformChecks.cmake - @${REINPLACE_CMD} -e 's,LOCALBASE,${LOCALBASE},' \ - ${WRKSRC}/doc/docgen.sh .if ${LUA_DEFAULT} == 5.2 # Force using lua 5.2 @${REINPLACE_CMD} -e 's/lua.*5\.*3//' \ @@ -149,7 +148,10 @@ post-patch: ${WRKSRC}/cmake/ConkyPlatformChecks.cmake .endif -post-build: - (cd ${WRKSRC}/doc && ${SH} docgen.sh) +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.for FILE in ${PORTDOCS} + ${INSTALL_MAN} ${WRKSRC}/doc/${FILE} ${STAGEDIR}${DOCSDIR} +.endfor .include diff --git a/sysutils/conky/distinfo b/sysutils/conky/distinfo index 032e6f51a2db..7ac4fe2c5c49 100644 --- a/sysutils/conky/distinfo +++ b/sysutils/conky/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1663601049 -SHA256 (brndnmtthws-conky-v1.13.1_GH0.tar.gz) = f85c96250b501e937b9b5d2ff3f06176e14777c94cec81373bbfc8a619d7a05a -SIZE (brndnmtthws-conky-v1.13.1_GH0.tar.gz) = 2443276 +TIMESTAMP = 1665603150 +SHA256 (brndnmtthws-conky-v1.14.0_GH0.tar.gz) = 36314449441eeae4d2bb1713cdd0738bfb581a9b23d5374137965684de04d964 +SIZE (brndnmtthws-conky-v1.14.0_GH0.tar.gz) = 1797564 diff --git a/sysutils/conky/files/patch-CMakeLists.txt b/sysutils/conky/files/patch-CMakeLists.txt index 72d5a7d5b727..e8131e7911a6 100644 --- a/sysutils/conky/files/patch-CMakeLists.txt +++ b/sysutils/conky/files/patch-CMakeLists.txt @@ -1,6 +1,6 @@ ---- CMakeLists.txt.orig 2019-06-23 14:50:35 UTC +--- CMakeLists.txt.orig 2022-10-12 18:18:08 UTC +++ CMakeLists.txt -@@ -72,9 +72,12 @@ if(BUILD_TESTS) +@@ -73,11 +73,14 @@ if(NOT DEFINED DOC_PATH) endif() if(NOT DEFINED DOC_PATH) @@ -13,18 +13,8 @@ +endif(NOT DEFINED SAMPLE_PATH) +set(SAMPLE_FILES extras/convert.lua data/conky_no_x11.conf data/conky.conf) - set(HTML_PATH "${DOC_PATH}/html") - set(HTML_FILES -@@ -83,10 +86,10 @@ set(HTML_FILES - doc/lua.html - doc/variables.html) - --set(MAN_PATH "share/man/man1") -+set(MAN_PATH "man/man1") - set(MAN_FILES doc/conky.1) - -install(FILES ${DOC_FILES} DESTINATION ${DOC_PATH}) +install(FILES ${SAMPLE_FILES} DESTINATION ${SAMPLE_PATH}) - if(BUILD_DOCS) - install(FILES ${HTML_FILES} DESTINATION ${HTML_PATH}) + if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + install(FILES conky.desktop DESTINATION share/applications) diff --git a/sysutils/conky/files/patch-doc_CMakeLists.txt b/sysutils/conky/files/patch-doc_CMakeLists.txt new file mode 100644 index 000000000000..d6ef42b5aa55 --- /dev/null +++ b/sysutils/conky/files/patch-doc_CMakeLists.txt @@ -0,0 +1,11 @@ +--- doc/CMakeLists.txt.orig 2022-10-12 18:18:08 UTC ++++ doc/CMakeLists.txt +@@ -32,7 +32,7 @@ if(BUILD_DOCS) + ) + add_dependencies(conky.1 man.md) + +- set(MAN_PATH "share/man/man1") ++ set(MAN_PATH "man/man1") + set(MAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/conky.1) + + install(FILES ${DOC_FILES} DESTINATION ${DOC_PATH}) diff --git a/sysutils/conky/files/patch-doc_docgen.sh b/sysutils/conky/files/patch-doc_docgen.sh deleted file mode 100644 index 7c85667e644b..000000000000 --- a/sysutils/conky/files/patch-doc_docgen.sh +++ /dev/null @@ -1,13 +0,0 @@ ---- doc/docgen.sh.orig 2019-08-12 21:53:54 UTC -+++ doc/docgen.sh -@@ -1,6 +1,9 @@ - #!/bin/sh - --xsltproc http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl docs.xml > docs.html && \ -+xsltproc LOCALBASE/share/xsl/docbook/html/docbook.xsl docs.xml > docs.html && \ -+xsltproc LOCALBASE/share/xsl/docbook/html/docbook.xsl variables.xml > variables.html && \ -+xsltproc LOCALBASE/share/xsl/docbook/html/docbook.xsl config_settings.xml > config_settings.html && \ -+xsltproc LOCALBASE/share/xsl/docbook/html/docbook.xsl lua.xml > lua.html && \ - db2x_xsltproc -s man docs.xml -o docs.mxml && \ - db2x_manxml docs.mxml && \ - { echo ".TH CONKY 1 \"August 2005\" \"conky compiled August 2005\" \"User Commands\""; sed 1d < conky.1; } > conky.2 && \ diff --git a/sysutils/conky/files/patch-src_display-console.cc b/sysutils/conky/files/patch-src_display-console.cc deleted file mode 100644 index aad2f1f14886..000000000000 --- a/sysutils/conky/files/patch-src_display-console.cc +++ /dev/null @@ -1,16 +0,0 @@ ---- src/display-console.cc.orig 2022-09-19 15:16:35 UTC -+++ src/display-console.cc -@@ -54,8 +54,11 @@ bool display_output_console::detect() { - } - - bool display_output_console::detect() { -- if ((out_to_stdout.get(*state) || out_to_stderr.get(*state)) && -- !out_to_ncurses.get(*state)) { -+ if ((out_to_stdout.get(*state) || out_to_stderr.get(*state)) -+#ifdef BUILD_NCURSES -+ && !out_to_ncurses.get(*state) -+#endif -+ ) { - DBGP2("Display output '%s' enabled in config.", name.c_str()); - return true; - } diff --git a/sysutils/conky/files/patch-src_freebsd.cc b/sysutils/conky/files/patch-src_freebsd.cc new file mode 100644 index 000000000000..2b9fc160c295 --- /dev/null +++ b/sysutils/conky/files/patch-src_freebsd.cc @@ -0,0 +1,30 @@ +--- src/freebsd.cc.orig 2022-10-12 18:18:08 UTC ++++ src/freebsd.cc +@@ -460,6 +460,27 @@ int get_battery_perct(const char *) { + return batcapacity; + } + ++void get_battery_power_draw(char *buffer, unsigned int n, const char *bat) { ++ int rate = 0; ++ double ret = 0; ++ ++ /* ++ * hw.acpi.battery.rate returns battery discharge rate in mW, ++ * or -1 (according to docs, but also 0 in practice) when not discharging. ++ * ++ * ref. acpi_battery(4) ++ */ ++ if (GETSYSCTL("hw.acpi.battery.rate", rate)) { ++ fprintf(stderr, "Cannot read sysctl \"hw.acpi.battery.rate\"\n"); ++ } ++ ++ if (rate > 0) { ++ ret = (double)rate/(double)1000; ++ } ++ ++ snprintf(buffer, n, "%.1f", ret); ++} ++ + double get_battery_perct_bar(struct text_object *obj) { + int batperct = get_battery_perct(obj->data.s); + return batperct;