summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2024-01-14 02:20:47 +0100
committerConrad Kostecki <conikost@gentoo.org>2024-01-14 02:32:04 +0100
commit59c90b123081511039e385ae5fe179ef63a8cac4 (patch)
treef18909145817f8d142427280527a424242e8c2b0
parentwww-client/chromium: drop 120.0.6099.71 (diff)
downloadgentoo-59c90b123081511039e385ae5fe179ef63a8cac4.tar.gz
gentoo-59c90b123081511039e385ae5fe179ef63a8cac4.tar.bz2
gentoo-59c90b123081511039e385ae5fe179ef63a8cac4.zip
app-misc/ebusd: new package, add 23.3
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
-rw-r--r--app-misc/ebusd/Manifest1
-rw-r--r--app-misc/ebusd/ebusd-23.3.ebuild100
-rw-r--r--app-misc/ebusd/files/ebusd-23.3-cxxflags.patch28
-rw-r--r--app-misc/ebusd/files/ebusd-23.3-docs.patch27
-rw-r--r--app-misc/ebusd/files/ebusd-23.3-gcc13.patch60
-rw-r--r--app-misc/ebusd/files/ebusd-23.3-gentoo.patch13
-rw-r--r--app-misc/ebusd/files/ebusd-23.3-htmlpath.patch20
-rw-r--r--app-misc/ebusd/files/ebusd.confd5
-rw-r--r--app-misc/ebusd/files/ebusd.initd20
-rw-r--r--app-misc/ebusd/files/ebusd.service13
-rw-r--r--app-misc/ebusd/metadata.xml22
11 files changed, 309 insertions, 0 deletions
diff --git a/app-misc/ebusd/Manifest b/app-misc/ebusd/Manifest
new file mode 100644
index 000000000000..d3d06c704d6f
--- /dev/null
+++ b/app-misc/ebusd/Manifest
@@ -0,0 +1 @@
+DIST ebusd-23.3.tar.gz 583788 BLAKE2B c61bf76e0c451672432689aeaf10b317adb52729ea0872cb01dca22e1f7ac12091d287dd082b87361ce37846b1d74c869588964f3dc71e82ffd00c4555e27150 SHA512 acf155d36e99db1c9c2ff04eabbfddba8493f2566b6691f609c86af0e42e3cb0594618fd51e874e475cfc7b9c742d1e010099f38e19c21f52c953ebcfb0f2ea2
diff --git a/app-misc/ebusd/ebusd-23.3.ebuild b/app-misc/ebusd/ebusd-23.3.ebuild
new file mode 100644
index 000000000000..eb2fca01442b
--- /dev/null
+++ b/app-misc/ebusd/ebusd-23.3.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd
+
+DESCRIPTION="Daemon for communication with eBUS heating systems"
+HOMEPAGE="
+ https://ebusd.de
+ https://github.com/john30/ebusd
+"
+SRC_URI="https://github.com/john30/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+contrib doc knx mqtt +ssl test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/openssl:0=
+ mqtt? ( app-misc/mosquitto )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ doc? (
+ app-text/doxygen
+ media-gfx/graphviz
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-23.3-cxxflags.patch"
+ "${FILESDIR}/${PN}-23.3-docs.patch"
+ "${FILESDIR}/${PN}-23.3-gcc13.patch"
+ "${FILESDIR}/${PN}-23.3-gentoo.patch"
+ "${FILESDIR}/${PN}-23.3-htmlpath.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # KNXd is currently not packaged in Gentoo
+ local myeconfargs=(
+ $(use_with contrib)
+ $(use_with doc docs)
+ $(use_with knx)
+ $(use_with mqtt)
+ $(use_with ssl)
+
+ --localstatedir="${EPREFIX}/var"
+ --without-knxd
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ default
+
+ if use test; then
+ pushd src/lib/ebus/test || die
+ emake
+ popd || die
+
+ if use contrib; then
+ pushd src/lib/ebus/contrib/test || die
+ emake
+ popd || die
+ fi
+ fi
+}
+
+src_test() {
+ pushd src/lib/ebus/test || die
+ ./test_filereader >/dev/null && \
+ ./test_data >/dev/null && \
+ ./test_message >/dev/null && \
+ ./test_symbol >/dev/null && \
+ einfo "standard: OK!" || die
+ popd || die
+
+ if use contrib; then
+ pushd src/lib/ebus/contrib/test || die
+ ./test_contrib >/dev/null && einfo "contrib: OK!" || die
+ popd || die
+ fi
+}
+
+src_install() {
+ default
+ use doc && dodoc -r docs/html
+ newinitd "${FILESDIR}"/ebusd.initd ebusd
+ newconfd "${FILESDIR}"/ebusd.confd ebusd
+ systemd_dounit "${FILESDIR}"/ebusd.service
+}
diff --git a/app-misc/ebusd/files/ebusd-23.3-cxxflags.patch b/app-misc/ebusd/files/ebusd-23.3-cxxflags.patch
new file mode 100644
index 000000000000..97b843d05ea2
--- /dev/null
+++ b/app-misc/ebusd/files/ebusd-23.3-cxxflags.patch
@@ -0,0 +1,28 @@
+From 6c2d102544f45856fb14484a3fc763822ff03376 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conikost@gentoo.org>
+Date: Sat, 13 Jan 2024 21:33:28 +0100
+Subject: [PATCH] configure.ac: quote CXXFLAGS
+
+CXXCLAGS needs to be quote, as otherwise the test could fail on some
+CXXFLAGS like '-mfpmath=sse,387'
+
+test: syntax error: `-mfpmath=sse,387' unexpected
+
+Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 90368e04..0469eb20 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR([build])
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_GNU_SOURCE
+
+-if test -z $CXXFLAGS; then
++if test -z "${CXXFLAGS}"; then
+ CXXFLAGS="-fpic -Wall -Wno-unused-function -Wextra -g -O2"
+ fi
+ AC_PROG_CXX([g++-6 g++-5 g++-4.9 g++-4.8 g++])
diff --git a/app-misc/ebusd/files/ebusd-23.3-docs.patch b/app-misc/ebusd/files/ebusd-23.3-docs.patch
new file mode 100644
index 000000000000..d8014fe53cd5
--- /dev/null
+++ b/app-misc/ebusd/files/ebusd-23.3-docs.patch
@@ -0,0 +1,27 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -47,6 +47,13 @@
+ if test "x$with_contrib" != "xno"; then
+ AC_DEFINE_UNQUOTED(HAVE_CONTRIB, [1], [Defined if contributed sources are enabled.])
+ fi
++AC_ARG_WITH(docs, AS_HELP_STRING([--without-docs], [disable generation of docs]), [], [with_docs=yes])
++if test "x$with_docs" != "xno"; then
++ AC_CHECK_PROGS([HAVE_DOXYGEN], [doxygen], [])
++ if test -z "$HAVE_DOXYGEN"; then
++ AC_MSG_WARN([Doxygen not found - continuing without Doxygen support.])
++ fi
++fi
+ AC_ARG_WITH(ebusfeed, AS_HELP_STRING([--with-ebusfeed], [enable inclusion of ebusfeed tool]), [with_ebusfeed=yes], [])
+ AM_CONDITIONAL([WITH_EBUSFEED], [test "x$with_ebusfeed" == "xyes"])
+ AC_ARG_WITH(mqtt, AS_HELP_STRING([--without-mqtt], [disable support for MQTT handling]), [], [with_mqtt=yes])
+@@ -156,10 +163,6 @@
+ else
+ AC_DEFINE(REVISION, "[m4_esyscmd_s([git describe --always 2>/dev/null || (date +p%Y%m%d)])]", [The revision of the package.])
+ fi
+-AC_CHECK_PROGS([HAVE_DOXYGEN], [doxygen], [])
+-if test -z "$HAVE_DOXYGEN"; then
+- AC_MSG_WARN([Doxygen not found - continuing without Doxygen support.])
+-fi
+
+ AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$HAVE_DOXYGEN"])
+ AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
diff --git a/app-misc/ebusd/files/ebusd-23.3-gcc13.patch b/app-misc/ebusd/files/ebusd-23.3-gcc13.patch
new file mode 100644
index 000000000000..fcdff55e714e
--- /dev/null
+++ b/app-misc/ebusd/files/ebusd-23.3-gcc13.patch
@@ -0,0 +1,60 @@
+From 3384f3780087bd6b94d46bf18cdad18201ad516c Mon Sep 17 00:00:00 2001
+From: John <ebusd@ebusd.eu>
+Date: Sat, 30 Dec 2023 17:38:19 +0100
+Subject: [PATCH] add missed includes as reported by gcc13
+
+---
+ src/ebusd/mqttclient.h | 1 +
+ src/ebusd/mqttclient_mosquitto.h | 1 +
+ src/lib/ebus/device.h | 1 +
+ src/lib/ebus/transport.h | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/src/ebusd/mqttclient.h b/src/ebusd/mqttclient.h
+index 5309d31a..965647ba 100755
+--- a/src/ebusd/mqttclient.h
++++ b/src/ebusd/mqttclient.h
+@@ -19,6 +19,7 @@
+ #ifndef EBUSD_MQTTCLIENT_H_
+ #define EBUSD_MQTTCLIENT_H_
+
++#include <cstdint>
+ #include <list>
+ #include <map>
+ #include <string>
+diff --git a/src/ebusd/mqttclient_mosquitto.h b/src/ebusd/mqttclient_mosquitto.h
+index d749b60b..e08ca5eb 100755
+--- a/src/ebusd/mqttclient_mosquitto.h
++++ b/src/ebusd/mqttclient_mosquitto.h
+@@ -21,6 +21,7 @@
+
+ #include "ebusd/mqttclient.h"
+ #include <mosquitto.h>
++#include <ctime>
+ #include <list>
+ #include <map>
+ #include <string>
+diff --git a/src/lib/ebus/device.h b/src/lib/ebus/device.h
+index d4224017..8da116a7 100755
+--- a/src/lib/ebus/device.h
++++ b/src/lib/ebus/device.h
+@@ -19,6 +19,7 @@
+ #ifndef LIB_EBUS_DEVICE_H_
+ #define LIB_EBUS_DEVICE_H_
+
++#include <cstdint>
+ #include <string>
+ #include "lib/ebus/result.h"
+ #include "lib/ebus/transport.h"
+diff --git a/src/lib/ebus/transport.h b/src/lib/ebus/transport.h
+index ec4c2319..ba3a8324 100755
+--- a/src/lib/ebus/transport.h
++++ b/src/lib/ebus/transport.h
+@@ -21,6 +21,7 @@
+
+ #include <unistd.h>
+ #include <termios.h>
++#include <cstdint>
+ #include <string>
+ #include "lib/ebus/result.h"
+ #include "lib/ebus/symbol.h"
diff --git a/app-misc/ebusd/files/ebusd-23.3-gentoo.patch b/app-misc/ebusd/files/ebusd-23.3-gentoo.patch
new file mode 100644
index 000000000000..9c5e518e269c
--- /dev/null
+++ b/app-misc/ebusd/files/ebusd-23.3-gentoo.patch
@@ -0,0 +1,13 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -145,8 +145,8 @@
+ src/lib/knx/Makefile
+ ])])
+
+-AC_DEFINE_UNQUOTED(PACKAGE_PIDFILE, "${localstatedir}/run/${PACKAGE_NAME}.pid", [The path and name of the PID file.])
+-AC_DEFINE_UNQUOTED(PACKAGE_LOGFILE, "${localstatedir}/log/${PACKAGE_NAME}.log", [The path and name of the log file.])
++AC_DEFINE_UNQUOTED(PACKAGE_PIDFILE, "${localstatedir}/run/${PACKAGE_NAME}/${PACKAGE_NAME}.pid", [The path and name of the PID file.])
++AC_DEFINE_UNQUOTED(PACKAGE_LOGFILE, "${localstatedir}/log/${PACKAGE_NAME}/${PACKAGE_NAME}.log", [The path and name of the log file.])
+ AC_DEFINE(SCAN_VERSION, "[m4_esyscmd_s([sed -e 's#^\([0-9]*\.[0-9]*\).*#\1#' -e 's#\.\([0-9]\)$#0\1#' -e 's#\.##' VERSION])]", [The version of the package formatted for the scan result.])
+ AC_DEFINE(PACKAGE_VERSION_MAJOR, [m4_esyscmd_s([sed -e 's#^\([0-9]*\)\..*$#\1#' VERSION])], [The major version of the package.])
+ AC_DEFINE(PACKAGE_VERSION_MINOR, [m4_esyscmd_s([sed -e 's#^.*\.\([0-9]*\)$#\1#' VERSION])], [The minor version of the package.])
diff --git a/app-misc/ebusd/files/ebusd-23.3-htmlpath.patch b/app-misc/ebusd/files/ebusd-23.3-htmlpath.patch
new file mode 100644
index 000000000000..abd2e87e5c93
--- /dev/null
+++ b/app-misc/ebusd/files/ebusd-23.3-htmlpath.patch
@@ -0,0 +1,20 @@
+--- a/src/ebusd/main_args.cpp
++++ b/src/ebusd/main_args.cpp
+@@ -79,7 +79,7 @@
+ .port = 8888,
+ .localOnly = false,
+ .httpPort = 0,
+- .htmlPath = "/var/" PACKAGE "/html",
++ .htmlPath = "/var/lib" PACKAGE "/html",
+ .updateCheck = true,
+
+ .logFile = PACKAGE_LOGFILE,
+@@ -199,7 +199,7 @@
+ {"port", 'p', "PORT", 0, "Listen for command line connections on PORT [8888]"},
+ {"localhost", O_LOCAL, nullptr, 0, "Listen for command line connections on 127.0.0.1 interface only"},
+ {"httpport", O_HTTPPT, "PORT", 0, "Listen for HTTP connections on PORT, 0 to disable [0]"},
+- {"htmlpath", O_HTMLPA, "PATH", 0, "Path for HTML files served by HTTP port [/var/ebusd/html]"},
++ {"htmlpath", O_HTMLPA, "PATH", 0, "Path for HTML files served by HTTP port [/var/lib/ebusd/html]"},
+ {"updatecheck", O_UPDCHK, "MODE", 0, "Set automatic update check to MODE (on|off) [on]"},
+
+ {nullptr, 0, nullptr, 0, "Log options:"},
diff --git a/app-misc/ebusd/files/ebusd.confd b/app-misc/ebusd/files/ebusd.confd
new file mode 100644
index 000000000000..2abae6bece1c
--- /dev/null
+++ b/app-misc/ebusd/files/ebusd.confd
@@ -0,0 +1,5 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Options to pass to ebusd (run "ebusd --help" for more info)
+EBUSD_OPTS="--scanconfig"
diff --git a/app-misc/ebusd/files/ebusd.initd b/app-misc/ebusd/files/ebusd.initd
new file mode 100644
index 000000000000..e0ef5fca9623
--- /dev/null
+++ b/app-misc/ebusd/files/ebusd.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2024 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/ebusd"
+command_args="${EBUSD_OPTS}"
+ebusd_path="/var/lib/ebusd"
+html_path="${ebusd_path}/html"
+logfile_path="/var/log/ebusd"
+logfile="${pidfile_path}/ebusd.log"
+name="eBUS daemon"
+pidfile_path="/run/ebusd"
+pidfile="${pidfile_path}/ebusd.pid"
+
+start_pre() {
+ checkpath -d -q "${ebusd_path}" "${html_path}"
+ checkpath -d -q "${logfile_path}"
+ checkpath -d -q "${pidfile_path}"
+ checkpath -f -q "${logfile}"
+}
diff --git a/app-misc/ebusd/files/ebusd.service b/app-misc/ebusd/files/ebusd.service
new file mode 100644
index 000000000000..b66f443524a8
--- /dev/null
+++ b/app-misc/ebusd/files/ebusd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=eBUS daemon
+After=network-online.target
+
+[Service]
+Type=forking
+User=ebusd
+Group=ebusd
+ExecStart=/usr/bin/ebusd ${EBUSD_OPTS}
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-misc/ebusd/metadata.xml b/app-misc/ebusd/metadata.xml
new file mode 100644
index 000000000000..8ea2abcad648
--- /dev/null
+++ b/app-misc/ebusd/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>conikost@gentoo.org</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <longdescription>
+ Ebusd is a daemon for handling communication with eBUS devices
+ connected to a 2-wire bus system. The "energy bus" is used by
+ numerous heating systems.
+ </longdescription>
+ <use>
+ <flag name="contrib">Compile and install additional user contribued plugins.</flag>
+ <flag name="knx">Enable support for connecting to KNX.</flag>
+ <flag name="mqtt">Enable support for connecting to MQTT.</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://github.com/john30/ebusd/issues</bugs-to>
+ <remote-id type="github">john30/ebusd</remote-id>
+ </upstream>
+</pkgmetadata>