Hello,
I'm not very skilled in ports maintenance.
I'm trying to update polybar port from 3.4.3 to 3.5.4 but I can't get
over a Sphinx error. I join the diff of what I made to the port.
When I try to complile, I have got this error:
[1/91] cd /usr/ports/pobj/polybar-3.5.4/build-amd64/doc &&
sphinx-build-3 -b html -c /usr/ports/pobj/polybar-3.5.4/build-amd64/doc
-d /usr/ports/pobj/polybar-3.5.4/build-amd64/doc/doctrees
/usr/ports/pobj/polybar-3.5.4/polybar-3.5.4/doc
/usr/ports/pobj/polybar-3.5.4/build-amd64/doc/html > builder-html.log
FAILED: doc/CMakeFiles/doc_html
cd /usr/ports/pobj/polybar-3.5.4/build-amd64/doc && sphinx-build-3 -b
html -c /usr/ports/pobj/polybar-3.5.4/build-amd64/doc -d
/usr/ports/pobj/polybar-3.5.4/build-amd64/doc/doctrees
/usr/ports/pobj/polybar-3.5.4/polybar-3.5.4/doc
/usr/ports/pobj/polybar-3.5.4/build-amd64/doc/html > builder-html.log
Exception occurred:
File "conf.py", line 20, in <module>
from sphinx.domains.changeset import VersionChange
ModuleNotFoundError: No module named 'sphinx.domains.changeset'
This wasn't occuring on the current port version.
What am I missing?
Thank you for your attention.
? maildiff
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/polybar/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile 10 Dec 2020 02:20:31 -0000 1.11
+++ Makefile 16 Feb 2021 13:29:03 -0000
@@ -1,10 +1,9 @@
# $OpenBSD: Makefile,v 1.11 2020/12/10 02:20:31 daniel Exp $
COMMENT = fast and easy-to-use status bar
-V = 3.4.3
+V = 3.5.4
DISTNAME = polybar-$V
CATEGORIES = x11
-REVISION = 1
HOMEPAGE = https://polybar.github.io/
MAINTAINER = Jasper Lievisse Adriaanse <[email protected]>
@@ -18,7 +17,7 @@ WANTLIB += pulse xcb xcb-composite xcb-c
WANTLIB += xcb-image xcb-randr xcb-util xcb-xkb xcb-xrm z
MASTER_SITES = https://github.com/polybar/polybar/releases/download/$V/
-EXTRACT_SUFX = .tar
+EXTRACT_SUFX = .tar.gz
# C++14
COMPILER = base-clang ports-gcc
@@ -48,7 +47,7 @@ CONFIGURE_ARGS = -DENABLE_CCACHE=OFF \
NO_TEST = Yes
-WRKDIST = ${WRKDIR}/polybar
+WRKDIST = ${WRKDIR}/polybar-$V
pre-configure:
${SUBST_CMD} ${WRKSRC}/cmake/02-opts.cmake \
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/polybar/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 15 May 2020 08:07:55 -0000 1.4
+++ distinfo 16 Feb 2021 13:29:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (polybar-3.4.3.tar) = 1O0SHB05YEk/gmj5ZtZalNlMRkakq7ExaH43tjYWgi8=
-SIZE (polybar-3.4.3.tar) = 2713600
+SHA256 (polybar-3.5.4.tar.gz) = Ezr06LKfQmWVrTt3OUju4nJ1IwiHhERzhT55QMeVnCs=
+SIZE (polybar-3.5.4.tar.gz) = 409258
Index: patches/patch-cmake_02-opts_cmake
===================================================================
RCS file: /cvs/ports/x11/polybar/patches/patch-cmake_02-opts_cmake,v
retrieving revision 1.1
diff -u -p -r1.1 patch-cmake_02-opts_cmake
--- patches/patch-cmake_02-opts_cmake 4 Nov 2019 19:14:00 -0000 1.1
+++ patches/patch-cmake_02-opts_cmake 16 Feb 2021 13:29:03 -0000
@@ -7,8 +7,8 @@ Index: cmake/02-opts.cmake
#
# Build options
#
--checklib(BUILD_DOC "binary" sphinx-build)
-+checklib(BUILD_DOC "binary" sphinx-build${MODPY_BIN_SUFFIX})
+-set(SPHINX_BUILD "sphinx-build" CACHE STRING "Name/Path of the sphinx-build
executable to use.")
++set(SPHINX_BUILD "sphinx-build${MODPY_BIN_SUFFIX}" CACHE STRING "Name/Path of
the sphinx-build executable to use.")
+ checklib(BUILD_DOC "binary" "${SPHINX_BUILD}")
checklib(ENABLE_ALSA "pkg-config" alsa)
- checklib(ENABLE_CURL "pkg-config" libcurl)
Index: patches/patch-doc_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/x11/polybar/patches/patch-doc_CMakeLists_txt,v
retrieving revision 1.1
diff -u -p -r1.1 patch-doc_CMakeLists_txt
--- patches/patch-doc_CMakeLists_txt 4 Nov 2019 19:14:00 -0000 1.1
+++ patches/patch-doc_CMakeLists_txt 16 Feb 2021 13:29:03 -0000
@@ -6,9 +6,9 @@ Index: doc/CMakeLists.txt
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
project(polybar-doc NONE)
- find_program(SPHINX_EXECUTABLE
-- NAMES sphinx-build
-+ NAMES sphinx-build${MODPY_BIN_SUFFIX}
- DOC "Sphinx Documentation Builder")
+ if(NOT SPHINX_BUILD)
+- set(SPHINX_BUILD "sphinx-build")
++ set(SPHINX_BUILD "sphinx-build${MODPY_BIN_SUFFIX}")
+ endif()
- if(NOT SPHINX_EXECUTABLE)
+ set(SPHINX_FLAGS "" CACHE STRING "Flags to pass to sphinx-build")
Index: patches/patch-include_modules_cpu_hpp
===================================================================
RCS file: /cvs/ports/x11/polybar/patches/patch-include_modules_cpu_hpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-include_modules_cpu_hpp
--- patches/patch-include_modules_cpu_hpp 20 Sep 2019 08:18:42 -0000
1.1.1.1
+++ patches/patch-include_modules_cpu_hpp 16 Feb 2021 13:29:03 -0000
@@ -3,23 +3,17 @@ $OpenBSD: patch-include_modules_cpu_hpp,
Index: include/modules/cpu.hpp
--- include/modules/cpu.hpp.orig
+++ include/modules/cpu.hpp
-@@ -7,10 +7,19 @@ POLYBAR_NS
-
- namespace modules {
+@@ -9,7 +9,13 @@ namespace modules {
struct cpu_time {
-+#ifdef __OpenBSD__
unsigned long long user;
unsigned long long nice;
++#ifdef __OpenBSD__
+ unsigned long long sys;
+ unsigned long long spin;
+ unsigned long long intr;
-+ unsigned long long idle;
+#else
-+ unsigned long long user;
-+ unsigned long long nice;
unsigned long long system;
- unsigned long long idle;
+#endif
+ unsigned long long idle;
+ unsigned long long steal;
unsigned long long total;
- };
-
Index: patches/patch-lib_i3ipcpp_CMakeLists_txt
===================================================================
RCS file: patches/patch-lib_i3ipcpp_CMakeLists_txt
diff -N patches/patch-lib_i3ipcpp_CMakeLists_txt
--- patches/patch-lib_i3ipcpp_CMakeLists_txt 11 Nov 2019 20:16:59 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-lib_i3ipcpp_CMakeLists_txt,v 1.2 2019/11/11 20:16:59 jasper
Exp $
-
-https://github.com/polybar/i3ipcpp/pull/8
-
-Index: lib/i3ipcpp/CMakeLists.txt
---- lib/i3ipcpp/CMakeLists.txt.orig
-+++ lib/i3ipcpp/CMakeLists.txt
-@@ -33,6 +33,8 @@ if(NOT JSONCPP_FOUND)
- set(JSONCPP_INCLUDEDIR ${PROJECT_SOURCE_DIR}/libs/jsoncpp-1.7.7/include)
- elseif(NOT JSONCPP_LIBRARIES AND JSONCPP_LIBS)
- set(JSONCPP_LIBRARIES "${JSONCPP_LIBS}")
-+else()
-+ set(JSONCPP_INCLUDEDIR "${JSONCPP_INCLUDE_DIRS}")
- endif()
-
- target_link_libraries(${PROJECT_NAME} PUBLIC ${JSONCPP_LIBRARIES})
Index: patches/patch-src_modules_cpu_cpp
===================================================================
RCS file: /cvs/ports/x11/polybar/patches/patch-src_modules_cpu_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_modules_cpu_cpp
--- patches/patch-src_modules_cpu_cpp 20 Sep 2019 08:18:42 -0000 1.1.1.1
+++ patches/patch-src_modules_cpu_cpp 16 Feb 2021 13:29:03 -0000
@@ -52,7 +52,7 @@ Index: src/modules/cpu.cpp
try {
std::ifstream in(PATH_CPU_INFO);
string str;
-@@ -129,7 +164,7 @@ namespace modules {
+@@ -130,7 +165,7 @@ namespace modules {
} catch (const std::ios_base::failure& e) {
m_log.err("Failed to read CPU values (what: %s)", e.what());
}
Index: patches/patch-src_modules_temperature_cpp
===================================================================
RCS file: patches/patch-src_modules_temperature_cpp
diff -N patches/patch-src_modules_temperature_cpp
--- patches/patch-src_modules_temperature_cpp 12 Dec 2019 17:09:47 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,91 +0,0 @@
-$OpenBSD: patch-src_modules_temperature_cpp,v 1.2 2019/12/12 17:09:47 jasper
Exp $
-
-Index: src/modules/temperature.cpp
---- src/modules/temperature.cpp.orig
-+++ src/modules/temperature.cpp
-@@ -8,6 +8,17 @@
-
- #include "modules/meta/base.inl"
-
-+#ifdef __OpenBSD__
-+#include <sys/param.h>
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#include <sys/sensors.h>
-+#include <errno.h>
-+#include <err.h>
-+
-+#define MUKTOC(v) ((v - 273150000) / 1000000.0)
-+#endif
-+
- POLYBAR_NS
-
- namespace modules {
-@@ -26,9 +37,11 @@ namespace modules {
- m_path = string_util::replace(PATH_TEMPERATURE_INFO, "%zone%",
to_string(m_zone));
- }
-
-+#ifndef __OpenBSD__
- if (!file_util::exists(m_path)) {
- throw module_error("The file '" + m_path + "' does not exist");
- }
-+#endif /* !__OpenBSD__ */
-
- m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_RAMP});
- m_formatter->add(FORMAT_WARN, TAG_LABEL_WARN, {TAG_LABEL_WARN, TAG_RAMP});
-@@ -51,8 +64,54 @@ namespace modules {
- }
-
- bool temperature_module::update() {
-+ int temp_f;
-+#ifdef __OpenBSD__
-+ /*
-+ * The following code was copied from i3status/print_cpu_temperature.c
-+ */
-+ struct sensordev sensordev;
-+ struct sensor sensor;
-+ size_t sdlen, slen;
-+ char device[16];
-+ int dev, mib[5] = {CTL_HW, HW_SENSORS, 0, 0, 0};
-+
-+ sdlen = sizeof(sensordev);
-+ slen = sizeof(sensor);
-+
-+ /*
-+ * Construct a sensors MIB by using hwmon-path and thermal-zone such
-+ * that hwmon-path represents the device (e.g. acpitz0 or ksmn0) and
thermal-zone
-+ * the Nth temperature sensor (e.g. temp0).
-+ */
-+ strlcpy(device, m_path.c_str(), sizeof(device));
-+
-+ for (dev = 0;; dev++) {
-+ mib[2] = dev;
-+ if (sysctl(mib, 3, &sensordev, &sdlen, NULL, 0) == -1) {
-+ if (errno == ENXIO)
-+ continue;
-+ if (errno == ENOENT)
-+ break;
-+ return false;
-+ }
-+
-+ if (strncmp(sensordev.xname, device, strlen(device)) == 0) {
-+ mib[3] = SENSOR_TEMP;
-+ mib[4] = m_zone;
-+ if (sysctl(mib, 5, &sensor, &slen, NULL, 0) == -1) {
-+ if (errno != ENOENT) {
-+ m_log.warn("sysctl failed");
-+ continue;
-+ }
-+ }
-+ }
-+ }
-+ m_temp = MUKTOC(sensor.value);
-+#else
- m_temp = std::strtol(file_util::contents(m_path).c_str(), nullptr, 10) /
1000.0f + 0.5f;
-- int temp_f = floor(((1.8 * m_temp) + 32) + 0.5);
-+#endif
-+
-+ temp_f = floor(((1.8 * m_temp) + 32) + 0.5);
- m_perc = math_util::cap(math_util::percentage(m_temp, m_tempbase,
m_tempwarn), 0, 100);
-
- string temp_c_string = to_string(m_temp);
Index: patches/patch-src_utils_file_cpp
===================================================================
RCS file: /cvs/ports/x11/polybar/patches/patch-src_utils_file_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_utils_file_cpp
--- patches/patch-src_utils_file_cpp 20 Sep 2019 08:18:42 -0000 1.1.1.1
+++ patches/patch-src_utils_file_cpp 16 Feb 2021 13:29:03 -0000
@@ -6,7 +6,7 @@ It causes clang++ to blow up.
Index: src/utils/file.cpp
--- src/utils/file.cpp.orig
+++ src/utils/file.cpp
-@@ -43,6 +43,7 @@ file_ptr::operator int() {
+@@ -46,6 +46,7 @@ file_ptr::operator int() {
return static_cast<const file_ptr&>(*this);
}
file_ptr::operator int() const {