* [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/, net-irc/znc/
@ 2024-01-05 11:35 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-01-05 11:35 UTC (permalink / raw
To: gentoo-commits
commit: e77bccc40c96e94bac5fe1ba796f02c3f00544c2
Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Fri Jan 5 08:58:49 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 5 11:35:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e77bccc4
net-irc/znc: fix build with dev-lang/swig-4.2.0
Closes: https://bugs.gentoo.org/921230
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Closes: https://github.com/gentoo/gentoo/pull/34654
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-irc/znc/files/znc-1.8.2-fix-swig-2.patch | 123 +++++++++++++++++++++++++++
net-irc/znc/znc-1.8.2-r2.ebuild | 3 +-
2 files changed, 125 insertions(+), 1 deletion(-)
diff --git a/net-irc/znc/files/znc-1.8.2-fix-swig-2.patch b/net-irc/znc/files/znc-1.8.2-fix-swig-2.patch
new file mode 100644
index 000000000000..91d7f5657cbe
--- /dev/null
+++ b/net-irc/znc/files/znc-1.8.2-fix-swig-2.patch
@@ -0,0 +1,123 @@
+From 3f4c1cce77cbe1337e5642e9e0e9d048c9e07370 Mon Sep 17 00:00:00 2001
+From: Alexey Sokolov <alexey+znc@asokolov.org>
+Date: Fri, 5 Jan 2024 02:19:55 +0000
+Subject: [PATCH] Fix build with SWIG 4.2.0
+
+https://bugs.gentoo.org/921230
+---
+ modules/modpython/codegen.pl | 88 ++++++++++++++++++++++++++----------
+ 1 file changed, 65 insertions(+), 23 deletions(-)
+
+diff --git a/modules/modpython/codegen.pl b/modules/modpython/codegen.pl
+index 1bc09806e0..bbcb148bed 100755
+--- a/modules/modpython/codegen.pl
++++ b/modules/modpython/codegen.pl
+@@ -50,29 +50,6 @@
+ ***************************************************************************/
+
+ namespace {
+-/* template<class T>
+- struct pyobj_to_ptr {
+- CString m_sType;
+- SvToPtr(const CString& sType) {
+- m_sType = sType;
+- }
+- bool operator()(PyObject* py, T** result) {
+- T* x = nullptr;
+- int res = SWIG_ConvertPtr(sv, (void**)&x, SWIG_TypeQuery(m_sType.c_str()), 0);
+- if (SWIG_IsOK(res)) {
+- *result = x;
+- return true;
+- }
+- DEBUG("modpython: ");
+- return false;
+- }
+- };
+-
+- CModule::EModRet SvToEModRet(PyObject* py, CModule::EModRet* result) {
+- long int x = PyLong_AsLong();
+- return static_cast<CModule::EModRet>(SvUV(sv));
+- }*/
+-
+ inline swig_type_info* SWIG_pchar_descriptor(void) {
+ static int init = 0;
+ static swig_type_info* info = 0;
+@@ -83,6 +60,70 @@
+ return info;
+ }
+
++// SWIG 4.2.0 replaced SWIG_Python_str_AsChar with SWIG_PyUnicode_AsUTF8AndSize.
++// SWIG doesn't provide any good way to detect SWIG version (other than parsing
++// `swig -version`), but it also introduced SWIG_NULLPTR.
++// So let's abuse that define to do different code for new SWIG.
++#ifdef SWIG_NULLPTR
++ // This is copied from some SWIG 4.2.0 from pystrings.swg
++ inline int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) {
++#if PY_VERSION_HEX>=0x03000000
++#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
++ if (PyBytes_Check(obj))
++#else
++ if (PyUnicode_Check(obj))
++#endif
++#else
++ if (PyString_Check(obj))
++#endif
++ {
++ char *cstr; Py_ssize_t len;
++ PyObject *bytes = NULL;
++ int ret = SWIG_OK;
++ if (alloc)
++ *alloc = SWIG_OLDOBJ;
++#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
++ if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
++ return SWIG_TypeError;
++#else
++ cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes);
++ if (!cstr)
++ return SWIG_TypeError;
++ /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */
++ if (bytes && cptr) {
++ if (alloc) {
++ //cstr = %new_copy_array(cstr, len + 1, char);
++ cstr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
++ *alloc = SWIG_NEWOBJ;
++ } else {
++ /* alloc must be set in order to clean up allocated memory */
++ return SWIG_RuntimeError;
++ }
++ }
++#endif
++ if (cptr) *cptr = cstr;
++ if (psize) *psize = len + 1;
++ Py_XDECREF(bytes);
++ return ret;
++ } else {
++ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
++ if (pchar_descriptor) {
++ void* vptr = 0;
++ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
++ if (cptr) *cptr = (char *) vptr;
++ if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
++ if (alloc) *alloc = SWIG_OLDOBJ;
++ return SWIG_OK;
++ }
++ }
++ }
++ return SWIG_TypeError;
++ }
++
++#else
++ // TODO: at some point drop support for SWIG<4.2.0 (drop this branch of ifdef)
++
++ // This is copied from some old SWIG version from pystrings.swg
+ inline int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) {
+ #if PY_VERSION_HEX>=0x03000000
+ if (PyUnicode_Check(obj))
+@@ -155,6 +196,7 @@
+ }
+ return SWIG_TypeError;
+ }
++#endif
+
+ inline int SWIG_AsPtr_CString (PyObject * obj, CString **val) {
+ char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
diff --git a/net-irc/znc/znc-1.8.2-r2.ebuild b/net-irc/znc/znc-1.8.2-r2.ebuild
index 6b6d33d21374..95ffdfe3d31e 100644
--- a/net-irc/znc/znc-1.8.2-r2.ebuild
+++ b/net-irc/znc/znc-1.8.2-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -76,6 +76,7 @@ PATCHES=(
"${FILESDIR}"/${P}-fix-python-3.10.patch
"${FILESDIR}"/${P}-fix-odr-violation.patch
"${FILESDIR}"/${P}-fix-swig.patch
+ "${FILESDIR}"/${P}-fix-swig-2.patch
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/, net-irc/znc/
@ 2024-12-02 6:03 John Helmert III
0 siblings, 0 replies; 4+ messages in thread
From: John Helmert III @ 2024-12-02 6:03 UTC (permalink / raw
To: gentoo-commits
commit: 48c391750022adf7604e8ea1cac2188bd8028b13
Author: John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 2 06:00:28 2024 +0000
Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Mon Dec 2 06:03:41 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48c39175
net-irc/znc: drop 1.8.2-r2, 1.9.0
Bug: https://bugs.gentoo.org/935422
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
net-irc/znc/Manifest | 3 -
net-irc/znc/files/znc-1.8.2-add-libera.patch | 55 -----
.../znc/files/znc-1.8.2-fix-odr-violation.patch | 56 -----
net-irc/znc/files/znc-1.8.2-fix-python-3.10.patch | 31 ---
net-irc/znc/files/znc-1.8.2-fix-swig-2.patch | 123 ----------
net-irc/znc/files/znc-1.8.2-fix-swig.patch | 43 ----
.../znc/files/znc-1.8.2-fix-systemd-datadir.patch | 23 --
....9.0-skip-modperl-modpython-tests-cleaner.patch | 248 ---------------------
net-irc/znc/znc-1.8.2-r2.ebuild | 197 ----------------
net-irc/znc/znc-1.9.0.ebuild | 199 -----------------
10 files changed, 978 deletions(-)
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest
index 97a5b8ade9f5..9653e1afdc3f 100644
--- a/net-irc/znc/Manifest
+++ b/net-irc/znc/Manifest
@@ -1,5 +1,2 @@
DIST gtest-1.14.0.tar.gz 867764 BLAKE2B c457f55ac572b9fb1553eee3df7eeeaf1e7dd2c3d747dd5e90dd279038fa5c71bb7b7d9ba1cf7e6143898b2a1d24d100584bd2a48ded41a426870c4825eec1b2 SHA512 765c326ccc1b87a01027385e69238266e356361cd4ee3e18e3c9d137a5d11fa5d657c164d02dd1be8fe693c8e10f2b580588dbfa57d27f070e2750f50d3e662c
-DIST gtest-1.8.1.tar.gz 992298 BLAKE2B 40ef3417fe424205c0617f07207347ce671ac87605f8ac9b8a333b0b06e3fbef9f556041ee324c18f957f3258ab9fe06704f31cdd038355fb7890180eb77ced1 SHA512 e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7
-DIST znc-1.8.2.tar.gz 2101215 BLAKE2B 7f0e5840fe57cc6b6549115b0fcf02e6afd3be0bf52e79da0a39bcc1463d983cbeb504bad30f3d2f7582f0295c7210d3c1eec40ec87bcc3546ba2d21a67cca9e SHA512 e821647b50698c3a82fad039e69943e030bf644d8f8e82afa87c6c11da44761bceecddd510a7a956a1b487b1cca6ee46e8ac8818ea03127f0f1ff8f5d1a1a7f9
-DIST znc-1.9.0.tar.gz 2221116 BLAKE2B 00bf472f0c223684c52a8c1a1a4b699346e58718161e6c40e3423591ef49aa13b6a530eb705e6f9e9cd6ce8937b4ee4e89de62d15aca7f2b19e1e8b603351d6e SHA512 22b8bd6fd7332643860f7a99ceaa0f6d0c9dd8ba9edac14b3f3731c9301eeb58e03e3af8d09e939e453aa980ff9f24afbe79e66d1106993f81d8779c97731a17
DIST znc-1.9.1.tar.gz 2236498 BLAKE2B b811939d13e45f2731f35721776e5f849078e14e785ae852cfc8ff7b1864d4ac6cae5aeba5ae01e529ffd366981f5ac8bb04f2586e60ac82af06d7af71f639db SHA512 939eafbb2f20569d1b15b66e38b7da7a5210f2023e6fc98018566bd757d62d8ef2682d4b4e3b326a933a99cd7d9d65596ff0e2c43a2315c70e27c64f02d526a6
diff --git a/net-irc/znc/files/znc-1.8.2-add-libera.patch b/net-irc/znc/files/znc-1.8.2-add-libera.patch
deleted file mode 100644
index e7015754d8c1..000000000000
--- a/net-irc/znc/files/znc-1.8.2-add-libera.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 15e2351d40763acee5d246df7c725c3bd259c304 Mon Sep 17 00:00:00 2001
-From: Alexey Sokolov <alexey+znc@asokolov.org>
-Date: Wed, 26 May 2021 10:10:20 +0100
-Subject: [PATCH] Switch --makeconf wizard from freenode to libera
-
----
- src/znc.cpp | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/znc.cpp b/src/znc.cpp
-index c5ad17dc69..365367545a 100644
---- a/src/znc.cpp
-+++ b/src/znc.cpp
-@@ -778,7 +778,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
- CUtils::PrintMessage("");
-
- do {
-- CUtils::GetInput("Name", sNetwork, "freenode");
-+ CUtils::GetInput("Name", sNetwork, "libera");
- } while (!CIRCNetwork::IsValidNetwork(sNetwork));
-
- vsLines.push_back("\t<Network " + sNetwork + ">");
-@@ -795,8 +795,8 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
- bool bSSL = false;
- unsigned int uServerPort = 0;
-
-- if (sNetwork.Equals("freenode")) {
-- sHost = "chat.freenode.net";
-+ if (sNetwork.Equals("libera")) {
-+ sHost = "irc.libera.chat";
- #ifdef HAVE_LIBSSL
- bSSL = true;
- #endif
-From 688645413c258f1fe42a39e42e5b5d1dead03d71 Mon Sep 17 00:00:00 2001
-From: Alexey Sokolov <alexey+znc@asokolov.org>
-Date: Fri, 18 Jun 2021 21:20:53 +0100
-Subject: [PATCH] Fix integration test after switch to libera
-
----
- test/integration/framework/znctest.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/test/integration/framework/znctest.cpp b/test/integration/framework/znctest.cpp
-index 195b6083a9..40dae85fc2 100644
---- a/test/integration/framework/znctest.cpp
-+++ b/test/integration/framework/znctest.cpp
-@@ -39,7 +39,7 @@ void WriteConfig(QString path) {
- p.ReadUntil("Real name"); p.Write();
- p.ReadUntil("Bind host"); p.Write();
- p.ReadUntil("Set up a network?"); p.Write();
-- p.ReadUntil("Name [freenode]"); p.Write("test");
-+ p.ReadUntil("Name [libera]"); p.Write("test");
- p.ReadUntil("Server host (host only)"); p.Write("127.0.0.1");
- p.ReadUntil("Server uses SSL?"); p.Write();
- p.ReadUntil("6667"); p.Write();
diff --git a/net-irc/znc/files/znc-1.8.2-fix-odr-violation.patch b/net-irc/znc/files/znc-1.8.2-fix-odr-violation.patch
deleted file mode 100644
index 967d6e35c2ea..000000000000
--- a/net-irc/znc/files/znc-1.8.2-fix-odr-violation.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 3e45b2f35f194100ec3293c7f3e36f95f48b0cb8 Mon Sep 17 00:00:00 2001
-From: Uli Schlachter <psychon@znc.in>
-Date: Fri, 5 Aug 2022 16:12:40 +0200
-Subject: [PATCH] Fix an ODR violation
-
-Building with CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch
--Werror=strict-aliasing" CXXFLAGS="-flto -Werror=odr
--Werror=lto-type-mismatch -Werror=strict-aliasing" LDFLAGS=-flto fails
-due to a violation of the one definition rule. There are two different
-definitions of TOption that are both linked into the znc binary.
-
-Fix this by putting them into anonymous namespaces.
-
-Fixes: https://github.com/znc/znc/issues/1834
-Signed-off-by: Uli Schlachter <psychon@znc.in>
----
- src/IRCNetwork.cpp | 2 ++
- src/User.cpp | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/src/IRCNetwork.cpp b/src/IRCNetwork.cpp
-index 46a2481a49..99f9242907 100644
---- a/src/IRCNetwork.cpp
-+++ b/src/IRCNetwork.cpp
-@@ -363,11 +363,13 @@ CString CIRCNetwork::GetNetworkPath() const {
- return sNetworkPath;
- }
-
-+namespace {
- template <class T>
- struct TOption {
- const char* name;
- void (CIRCNetwork::*pSetter)(T);
- };
-+}
-
- bool CIRCNetwork::ParseConfig(CConfig* pConfig, CString& sError,
- bool bUpgrade) {
-diff --git a/src/User.cpp b/src/User.cpp
-index 2ab5fac66f..16624adbbe 100644
---- a/src/User.cpp
-+++ b/src/User.cpp
-@@ -135,11 +135,13 @@ CUser::~CUser() {
- CZNC::Get().AddBytesWritten(m_uBytesWritten);
- }
-
-+namespace {
- template <class T>
- struct TOption {
- const char* name;
- void (CUser::*pSetter)(T);
- };
-+}
-
- bool CUser::ParseConfig(CConfig* pConfig, CString& sError) {
- TOption<const CString&> StringOptions[] = {
diff --git a/net-irc/znc/files/znc-1.8.2-fix-python-3.10.patch b/net-irc/znc/files/znc-1.8.2-fix-python-3.10.patch
deleted file mode 100644
index fe40d190d1ba..000000000000
--- a/net-irc/znc/files/znc-1.8.2-fix-python-3.10.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From e8ff16123582eb9d5c321f5c7e652335abfba368 Mon Sep 17 00:00:00 2001
-From: Alexey Sokolov <alexey+znc@asokolov.org>
-Date: Sat, 23 May 2020 13:28:13 +0100
-Subject: [PATCH] Fix PY_SSIZE_T_CLEAN python warning
-
----
- .travis.yml | 2 +-
- modules/modpython.cpp | 3 ++-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/modules/modpython.cpp b/modules/modpython.cpp
-index dfe53b5b6b..7bc76fc5c1 100644
---- a/modules/modpython.cpp
-+++ b/modules/modpython.cpp
-@@ -14,6 +14,7 @@
- * limitations under the License.
- */
-
-+#define PY_SSIZE_T_CLEAN
- #include <Python.h>
-
- #include <znc/Chan.h>
-@@ -455,7 +456,7 @@ CBSOCK(ConnectionRefused);
- void CPySocket::ReadData(const char* data, size_t len) {
- PyObject* pyRes =
- PyObject_CallMethod(m_pyObj, const_cast<char*>("OnReadData"),
-- const_cast<char*>("y#"), data, (int)len);
-+ const_cast<char*>("y#"), data, (Py_ssize_t)len);
- CHECKCLEARSOCK("OnReadData");
- }
-
diff --git a/net-irc/znc/files/znc-1.8.2-fix-swig-2.patch b/net-irc/znc/files/znc-1.8.2-fix-swig-2.patch
deleted file mode 100644
index 91d7f5657cbe..000000000000
--- a/net-irc/znc/files/znc-1.8.2-fix-swig-2.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 3f4c1cce77cbe1337e5642e9e0e9d048c9e07370 Mon Sep 17 00:00:00 2001
-From: Alexey Sokolov <alexey+znc@asokolov.org>
-Date: Fri, 5 Jan 2024 02:19:55 +0000
-Subject: [PATCH] Fix build with SWIG 4.2.0
-
-https://bugs.gentoo.org/921230
----
- modules/modpython/codegen.pl | 88 ++++++++++++++++++++++++++----------
- 1 file changed, 65 insertions(+), 23 deletions(-)
-
-diff --git a/modules/modpython/codegen.pl b/modules/modpython/codegen.pl
-index 1bc09806e0..bbcb148bed 100755
---- a/modules/modpython/codegen.pl
-+++ b/modules/modpython/codegen.pl
-@@ -50,29 +50,6 @@
- ***************************************************************************/
-
- namespace {
--/* template<class T>
-- struct pyobj_to_ptr {
-- CString m_sType;
-- SvToPtr(const CString& sType) {
-- m_sType = sType;
-- }
-- bool operator()(PyObject* py, T** result) {
-- T* x = nullptr;
-- int res = SWIG_ConvertPtr(sv, (void**)&x, SWIG_TypeQuery(m_sType.c_str()), 0);
-- if (SWIG_IsOK(res)) {
-- *result = x;
-- return true;
-- }
-- DEBUG("modpython: ");
-- return false;
-- }
-- };
--
-- CModule::EModRet SvToEModRet(PyObject* py, CModule::EModRet* result) {
-- long int x = PyLong_AsLong();
-- return static_cast<CModule::EModRet>(SvUV(sv));
-- }*/
--
- inline swig_type_info* SWIG_pchar_descriptor(void) {
- static int init = 0;
- static swig_type_info* info = 0;
-@@ -83,6 +60,70 @@
- return info;
- }
-
-+// SWIG 4.2.0 replaced SWIG_Python_str_AsChar with SWIG_PyUnicode_AsUTF8AndSize.
-+// SWIG doesn't provide any good way to detect SWIG version (other than parsing
-+// `swig -version`), but it also introduced SWIG_NULLPTR.
-+// So let's abuse that define to do different code for new SWIG.
-+#ifdef SWIG_NULLPTR
-+ // This is copied from some SWIG 4.2.0 from pystrings.swg
-+ inline int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) {
-+#if PY_VERSION_HEX>=0x03000000
-+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-+ if (PyBytes_Check(obj))
-+#else
-+ if (PyUnicode_Check(obj))
-+#endif
-+#else
-+ if (PyString_Check(obj))
-+#endif
-+ {
-+ char *cstr; Py_ssize_t len;
-+ PyObject *bytes = NULL;
-+ int ret = SWIG_OK;
-+ if (alloc)
-+ *alloc = SWIG_OLDOBJ;
-+#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-+ if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
-+ return SWIG_TypeError;
-+#else
-+ cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes);
-+ if (!cstr)
-+ return SWIG_TypeError;
-+ /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */
-+ if (bytes && cptr) {
-+ if (alloc) {
-+ //cstr = %new_copy_array(cstr, len + 1, char);
-+ cstr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
-+ *alloc = SWIG_NEWOBJ;
-+ } else {
-+ /* alloc must be set in order to clean up allocated memory */
-+ return SWIG_RuntimeError;
-+ }
-+ }
-+#endif
-+ if (cptr) *cptr = cstr;
-+ if (psize) *psize = len + 1;
-+ Py_XDECREF(bytes);
-+ return ret;
-+ } else {
-+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-+ if (pchar_descriptor) {
-+ void* vptr = 0;
-+ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
-+ if (cptr) *cptr = (char *) vptr;
-+ if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
-+ if (alloc) *alloc = SWIG_OLDOBJ;
-+ return SWIG_OK;
-+ }
-+ }
-+ }
-+ return SWIG_TypeError;
-+ }
-+
-+#else
-+ // TODO: at some point drop support for SWIG<4.2.0 (drop this branch of ifdef)
-+
-+ // This is copied from some old SWIG version from pystrings.swg
- inline int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) {
- #if PY_VERSION_HEX>=0x03000000
- if (PyUnicode_Check(obj))
-@@ -155,6 +196,7 @@
- }
- return SWIG_TypeError;
- }
-+#endif
-
- inline int SWIG_AsPtr_CString (PyObject * obj, CString **val) {
- char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
diff --git a/net-irc/znc/files/znc-1.8.2-fix-swig.patch b/net-irc/znc/files/znc-1.8.2-fix-swig.patch
deleted file mode 100644
index d07d136c5940..000000000000
--- a/net-irc/znc/files/znc-1.8.2-fix-swig.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From fecdd9895894b3afe903021b0843a422eb4d3308 Mon Sep 17 00:00:00 2001
-From: Alexey Sokolov <alexey+znc@asokolov.org>
-Date: Sat, 5 Nov 2022 12:54:40 +0000
-Subject: [PATCH] Add support SWIG 4.1.0, drop support for < 4.0.1
-
-https://bugs.gentoo.org/878587
----
- CMakeLists.txt | 2 +-
- modules/modperl/CMakeLists.txt | 1 -
- modules/modpython/CMakeLists.txt | 1 -
- 3 files changed, 1 insertion(+), 3 deletions(-)
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -173,7 +173,7 @@ if(WANT_PYTHON AND NOT EXISTS
- endif()
- endif()
- if(search_swig)
-- find_package(SWIG 3.0.0)
-+ find_package(SWIG 4.0.1)
- if(NOT SWIG_FOUND)
- message(FATAL_ERROR
- "Can't find SWIG, therefore Perl and Python aren't supported. "
---- a/modules/modperl/CMakeLists.txt
-+++ b/modules/modperl/CMakeLists.txt
-@@ -53,7 +53,6 @@ if(SWIG_FOUND)
- "-I${PROJECT_SOURCE_DIR}/include"
- "-I${CMAKE_CURRENT_SOURCE_DIR}/.."
- "-I${CMAKE_CURRENT_SOURCE_DIR}/include"
-- -DZNC_EXPORT_LIB_EXPORT
- -outdir "${CMAKE_CURRENT_BINARY_DIR}"
- -o "${CMAKE_CURRENT_BINARY_DIR}/modperl_biglib.cpp"
- "${CMAKE_CURRENT_SOURCE_DIR}/modperl.i"
---- a/modules/modpython/CMakeLists.txt
-+++ b/modules/modpython/CMakeLists.txt
-@@ -50,7 +50,6 @@ if(SWIG_FOUND)
- "-I${PROJECT_BINARY_DIR}/include"
- "-I${PROJECT_SOURCE_DIR}/include"
- "-I${CMAKE_CURRENT_SOURCE_DIR}/.."
-- -DZNC_EXPORT_LIB_EXPORT
- -outdir "${CMAKE_CURRENT_BINARY_DIR}"
- -o "${CMAKE_CURRENT_BINARY_DIR}/modpython_biglib.cpp"
- "${CMAKE_CURRENT_SOURCE_DIR}/modpython.i"
diff --git a/net-irc/znc/files/znc-1.8.2-fix-systemd-datadir.patch b/net-irc/znc/files/znc-1.8.2-fix-systemd-datadir.patch
deleted file mode 100644
index 06dd6991b4a4..000000000000
--- a/net-irc/znc/files/znc-1.8.2-fix-systemd-datadir.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From d4bfd143b4b12f6e6695878cc1b5168cc31c362c Mon Sep 17 00:00:00 2001
-From: Alexey Sokolov <alexey+znc@asokolov.org>
-Date: Tue, 22 Sep 2020 10:20:47 +0100
-Subject: [PATCH] Fix path in systemd service (which shouldn't be here at all)
-
-https://bugs.gentoo.org/743856
----
- znc.service.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/znc.service.in b/znc.service.in
-index a6c9e68df..7accad906 100644
---- a/znc.service.in
-+++ b/znc.service.in
-@@ -3,7 +3,7 @@ Description=ZNC, an advanced IRC bouncer
- After=network.target
-
- [Service]
--ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/znc -f
-+ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/znc -f --datadir=/var/lib/znc
- User=znc
-
- [Install]
diff --git a/net-irc/znc/files/znc-1.9.0-skip-modperl-modpython-tests-cleaner.patch b/net-irc/znc/files/znc-1.9.0-skip-modperl-modpython-tests-cleaner.patch
deleted file mode 100644
index fae99b5d6583..000000000000
--- a/net-irc/znc/files/znc-1.9.0-skip-modperl-modpython-tests-cleaner.patch
+++ /dev/null
@@ -1,248 +0,0 @@
-https://github.com/znc/znc/commit/f8552fc814ebe662a9fc16d6cafa1c0314498971
-
-From f8552fc814ebe662a9fc16d6cafa1c0314498971 Mon Sep 17 00:00:00 2001
-From: Alexey Sokolov <alexey+znc@asokolov.org>
-Date: Sun, 25 Feb 2024 14:12:53 +0000
-Subject: [PATCH] Skip modperl/modpython tests cleaner
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -411,6 +411,8 @@ else()
- endif()
-
- configure_file("include/znc/zncconfig.h.cmake.in" "include/znc/zncconfig.h")
-+configure_file("test/integration/znctestconfig.h.cmake.in"
-+ "test/integration/znctestconfig.h")
- add_subdirectory(include)
- add_subdirectory(src)
- add_subdirectory(modules)
---- a/test/integration/CMakeLists.txt
-+++ b/test/integration/CMakeLists.txt
-@@ -45,6 +45,7 @@ add_executable(inttest
- target_link_libraries(inttest Qt5::Network Threads::Threads)
- target_include_directories(inttest PUBLIC
- "${PROJECT_SOURCE_DIR}/framework"
-+ "${PROJECT_BINARY_DIR}"
- "${GTEST_ROOT}" "${GTEST_ROOT}/include"
- "${GMOCK_ROOT}" "${GMOCK_ROOT}/include")
- target_compile_definitions(inttest PRIVATE
---- a/test/integration/tests/core.cpp
-+++ b/test/integration/tests/core.cpp
-@@ -14,9 +14,11 @@
- * limitations under the License.
- */
-
-+#include <gtest/gtest.h>
- #include <gmock/gmock.h>
-
- #include "znctest.h"
-+#include "znctestconfig.h"
-
- using testing::HasSubstr;
- using testing::ContainsRegex;
-@@ -584,10 +586,9 @@ TEST_P(AllLanguages, ServerDependentCapInModule) {
- )");
- break;
- case 2:
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PYTHON
-+ GTEST_SKIP() << "Modpython is disabled";
-+#endif
- znc->CanLeak();
- InstallModule("testmod.py", R"(
- import znc
-@@ -603,10 +604,9 @@ TEST_P(AllLanguages, ServerDependentCapInModule) {
- client.Write("znc loadmod modpython");
- break;
- case 3:
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PERL
-+ GTEST_SKIP() << "Modperl is disabled";
-+#endif
- znc->CanLeak();
- InstallModule("testmod.pm", R"(
- package testmod;
---- a/test/integration/tests/scripting.cpp
-+++ b/test/integration/tests/scripting.cpp
-@@ -15,15 +15,15 @@
- */
-
- #include "znctest.h"
-+#include "znctestconfig.h"
-
- namespace znc_inttest {
- namespace {
-
- TEST_F(ZNCTest, Modperl) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PERL
-+ GTEST_SKIP() << "Modperl is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
- auto ircd = ConnectIRCd();
-@@ -37,10 +37,9 @@ TEST_F(ZNCTest, Modperl) {
- }
-
- TEST_F(ZNCTest, Modpython) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PYTHON
-+ GTEST_SKIP() << "Modpython is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
- auto ircd = ConnectIRCd();
-@@ -65,10 +64,9 @@ TEST_F(ZNCTest, Modpython) {
- }
-
- TEST_F(ZNCTest, ModpythonSocket) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PYTHON
-+ GTEST_SKIP() << "Modpython is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
-
-@@ -107,10 +105,9 @@ TEST_F(ZNCTest, ModpythonSocket) {
- }
-
- TEST_F(ZNCTest, ModperlSocket) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PERL
-+ GTEST_SKIP() << "Modperl is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
-
-@@ -160,10 +157,9 @@ TEST_F(ZNCTest, ModperlSocket) {
- }
-
- TEST_F(ZNCTest, ModpythonVCString) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PYTHON
-+ GTEST_SKIP() << "Modpython is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
-
-@@ -185,10 +181,9 @@ TEST_F(ZNCTest, ModpythonVCString) {
- }
-
- TEST_F(ZNCTest, ModperlVCString) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PERL
-+ GTEST_SKIP() << "Modperl is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
-
-@@ -214,10 +209,9 @@ TEST_F(ZNCTest, ModperlVCString) {
- }
-
- TEST_F(ZNCTest, ModperlNV) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PERL
-+ GTEST_SKIP() << "Modperl is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
-
-@@ -244,10 +238,9 @@ TEST_F(ZNCTest, ModperlNV) {
- }
-
- TEST_F(ZNCTest, ModpythonPackage) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PYTHON
-+ GTEST_SKIP() << "Modpython is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
-
-@@ -285,10 +278,12 @@ TEST_F(ZNCTest, ModpythonPackage) {
- }
-
- TEST_F(ZNCTest, ModpythonModperl) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
-+#ifndef WANT_PYTHON
-+ GTEST_SKIP() << "Modpython is disabled";
-+#endif
-+#ifndef WANT_PERL
-+ GTEST_SKIP() << "Modperl is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
-
-@@ -302,11 +297,9 @@ TEST_F(ZNCTest, ModpythonModperl) {
- }
-
- TEST_F(ZNCTest, ModpythonCommand) {
-- if (QProcessEnvironment::systemEnvironment().value(
-- "DISABLED_ZNC_PERL_PYTHON_TEST") == "1") {
-- return;
-- }
--
-+#ifndef WANT_PYTHON
-+ GTEST_SKIP() << "Modpython is disabled";
-+#endif
- auto znc = Run();
- znc->CanLeak();
-
---- /dev/null
-+++ b/test/integration/znctestconfig.h.cmake.in
-@@ -0,0 +1,23 @@
-+/*
-+ * Copyright (C) 2004-2024 ZNC, see the NOTICE file for details.
-+ *
-+ * Licensed under the Apache License, Version 2.0 (the "License");
-+ * you may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ * http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing, software
-+ * distributed under the License is distributed on an "AS IS" BASIS,
-+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+ * See the License for the specific language governing permissions and
-+ * limitations under the License.
-+ */
-+
-+#ifndef ZNCTESTCONFIG_H
-+#define ZNCTESTCONFIG_H
-+
-+#cmakedefine WANT_PYTHON 1
-+#cmakedefine WANT_PERL 1
-+
-+#endif /* ZNCTESTCONFIG_H */
diff --git a/net-irc/znc/znc-1.8.2-r2.ebuild b/net-irc/znc/znc-1.8.2-r2.ebuild
deleted file mode 100644
index 95ffdfe3d31e..000000000000
--- a/net-irc/znc/znc-1.8.2-r2.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit cmake python-single-r1 readme.gentoo-r1 systemd
-
-GTEST_VER="1.8.1"
-GTEST_URL="https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz"
-DESCRIPTION="An advanced IRC Bouncer"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/znc/znc.git"
-else
- MY_PV=${PV/_/-}
- MY_P=${PN}-${MY_PV}
- SRC_URI="
- https://znc.in/releases/archive/${MY_P}.tar.gz
- test? ( ${GTEST_URL} )
- "
- KEYWORDS="amd64 arm arm64 ~ppc64 ~riscv x86"
- S=${WORKDIR}/${MY_P}
-fi
-
-HOMEPAGE="https://znc.in"
-LICENSE="Apache-2.0"
-# "If you upgrade your ZNC version, you must recompile all your modules."
-# - https://wiki.znc.in/Compiling_modules
-SLOT="0/${PV}"
-IUSE="+icu nls perl python +ssl sasl tcl test +zlib"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )"
-
-# perl is a build-time dependency of modpython
-BDEPEND="
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- perl? (
- >=dev-lang/swig-4.0.1
- >=dev-lang/perl-5.10
- )
- python? (
- >=dev-lang/swig-4.0.1
- >=dev-lang/perl-5.10
- )
- test? (
- ${PYTHON_DEPS}
- dev-qt/qtnetwork:5
- )
-"
-DEPEND="
- icu? ( dev-libs/icu:= )
- nls? ( dev-libs/boost:=[nls] )
- perl? ( >=dev-lang/perl-5.10:= )
- python? ( ${PYTHON_DEPS} )
- sasl? ( >=dev-libs/cyrus-sasl-2 )
- ssl? ( dev-libs/openssl:0= )
- tcl? ( dev-lang/tcl:0= )
- zlib? ( sys-libs/zlib:0= )
-"
-RDEPEND="
- ${DEPEND}
- acct-user/znc
- acct-group/znc
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch
- # All these are backports
- "${FILESDIR}"/${P}-fix-systemd-datadir.patch
- "${FILESDIR}"/${P}-add-libera.patch
- "${FILESDIR}"/${P}-fix-python-3.10.patch
- "${FILESDIR}"/${P}-fix-odr-violation.patch
- "${FILESDIR}"/${P}-fix-swig.patch
- "${FILESDIR}"/${P}-fix-swig-2.patch
-)
-
-pkg_setup() {
- if use python; then
- python-single-r1_pkg_setup
- fi
-}
-
-src_prepare() {
- # Let SWIG rebuild modperl/modpython to make user patching easier.
- if [[ ${PV} != *9999* ]]; then
- rm modules/modperl/generated.tar.gz || die
- rm modules/modpython/generated.tar.gz || die
- fi
-
- sed -i -e "s|DZNC_BIN_DIR:path=|DZNC_BIN_DIR:path=${T}/inttest|" \
- test/CMakeLists.txt || die
-
- sed -i "s|--datadir=|&${EPREFIX}|" znc.service.in || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DWANT_SYSTEMD=yes # Causes -DSYSTEMD_DIR to be used.
- -DSYSTEMD_DIR="$(systemd_get_systemunitdir)"
- -DWANT_ICU="$(usex icu)"
- -DWANT_IPV6=yes
- -DWANT_I18N="$(usex nls)"
- -DWANT_PERL="$(usex perl)"
- -DWANT_PYTHON="$(usex python)"
- -DWANT_PYTHON_VERSION="${EPYTHON#python}"
- -DWANT_CYRUS="$(usex sasl)"
- -DWANT_OPENSSL="$(usex ssl)"
- -DWANT_TCL="$(usex tcl)"
- -DWANT_ZLIB="$(usex zlib)"
- )
-
- if [[ ${PV} != *9999* ]] && use test; then
- export GTEST_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googletest"
- export GMOCK_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googlemock"
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- cmake_build unittest
- DESTDIR="${T}/inttest" cmake_build install
- local filter='-'
- if ! use perl; then
- filter="${filter}:ZNCTest.Modperl*"
- fi
- if ! use python; then
- filter="${filter}:ZNCTest.Modpython*"
- fi
- # CMAKE_PREFIX_PATH and CXXFLAGS are needed for znc-buildmod
- # invocations from inside the test
- GTEST_FILTER="${filter}" ZNC_UNUSUAL_ROOT="${T}/inttest" \
- CMAKE_PREFIX_PATH="${T}/inttest/usr/share/znc/cmake" \
- CXXFLAGS="${CXXFLAGS} -isystem ${T}/inttest/usr/include" \
- cmake_build inttest
-}
-
-src_install() {
- cmake_src_install
-
- dodoc NOTICE
- newinitd "${FILESDIR}"/znc.initd-r2 znc
- newconfd "${FILESDIR}"/znc.confd-r1 znc
-
- local DOC_CONTENTS
- # "local" has its own return value which is not what we want to catch
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") || die
- local DISABLE_AUTOFORMATTING=1
- readme.gentoo_create_doc
-}
-
-pkg_postinst() {
- if [[ -d "${EROOT}/var/lib/znc/.znc/" ]]; then
- eerror "${EROOT}/var/lib/znc/.znc/ exists, please move your data to ${EROOT}/var/lib/znc/"
- eerror ""
- eerror "The systemd unit has changed and now expects data to be located"
- eerror "at the root of ${EROOT}/var/lib/znc instead of its '.znc' subfolder."
- eerror "The recommended procedure to move the data is the following:"
- eerror "1. stop the service: systemctl stop znc.service"
- eerror "2. move the data: cp -a '${EROOT}/var/lib/znc/.znc/.' '${EROOT}/var/lib/znc/'"
- eerror "3. fix the config file: sed -i 's|${EROOT}/var/lib/znc/.znc|${EROOT}/var/lib/znc|g' '${EROOT}/var/lib/znc/configs/znc.conf'"
- eerror "4. restart znc: systemctl start znc.service"
- eerror "5. once everything works, remove the old data directory: rm -r '${EROOT}/var/lib/znc/.znc/'"
- eerror "See https://bugs.gentoo.org/743856 for details."
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- # This is a new installation
- readme.gentoo_print_elog
- fi
-}
-
-pkg_config() {
- if [[ -d "${EROOT}/var/lib/znc/configs" ]]; then
- ewarn "${EROOT}/var/lib/znc/configs/ already exists,"
- ewarn "aborting to avoid damaging any existing configuration."
- ewarn "If you are sure you want to generate a new configuration,"
- ewarn "remove the folder and try again."
- else
- einfo "Press enter to interactively create a new configuration file for znc."
- einfo "To abort, press Control-C"
- read
- su ${PN} -p -s /bin/sh -c 'ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \
- "${EROOT}"/usr/bin/znc --makeconf \
- --datadir "${EROOT}/var/lib/znc"' || die "Config failed"
- einfo
- einfo "You can now start the znc service using the init system of your choice."
- einfo "Don't forget to enable it if you want to use znc at boot."
- fi
-}
diff --git a/net-irc/znc/znc-1.9.0.ebuild b/net-irc/znc/znc-1.9.0.ebuild
deleted file mode 100644
index 66924afe2f6d..000000000000
--- a/net-irc/znc/znc-1.9.0.ebuild
+++ /dev/null
@@ -1,199 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit cmake python-single-r1 readme.gentoo-r1 systemd
-
-GTEST_VER="1.14.0"
-GTEST_URL="https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz"
-DESCRIPTION="An advanced IRC Bouncer"
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/znc/znc.git"
-else
- MY_PV=${PV/_/-}
- MY_P=${PN}-${MY_PV}
- SRC_URI="
- https://znc.in/releases/archive/${MY_P}.tar.gz
- test? ( ${GTEST_URL} )
- "
- KEYWORDS="amd64 arm arm64 ~ppc64 ~riscv x86"
- S=${WORKDIR}/${MY_P}
-fi
-
-HOMEPAGE="https://znc.in"
-LICENSE="Apache-2.0"
-# "If you upgrade your ZNC version, you must recompile all your modules."
-# - https://wiki.znc.in/Compiling_modules
-SLOT="0/${PV}"
-IUSE="+argon2 +icu nls perl python +ssl sasl tcl test +zlib"
-RESTRICT="!test? ( test )"
-
-# tests run znc-buildmod which is a Python script
-REQUIRED_USE="
- python? ( ${PYTHON_REQUIRED_USE} icu )
- test? ( ${PYTHON_REQUIRED_USE} )
-"
-
-# perl is a build-time dependency of modpython
-BDEPEND="
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- perl? (
- >=dev-lang/swig-4.0.1
- >=dev-lang/perl-5.10
- )
- python? (
- >=dev-lang/swig-4.0.1
- >=dev-lang/perl-5.10
- )
- test? (
- ${PYTHON_DEPS}
- dev-qt/qtnetwork:5
- )
-"
-DEPEND="
- dev-cpp/cctz:=
- argon2? ( app-crypt/argon2:= )
- icu? ( dev-libs/icu:= )
- nls? ( dev-libs/boost:=[nls] )
- perl? ( >=dev-lang/perl-5.10:= )
- python? ( ${PYTHON_DEPS} )
- sasl? ( >=dev-libs/cyrus-sasl-2 )
- ssl? ( dev-libs/openssl:0= )
- tcl? ( dev-lang/tcl:0= )
- zlib? ( sys-libs/zlib:0= )
-"
-RDEPEND="
- ${DEPEND}
- acct-user/znc
- acct-group/znc
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.7.1-inttest-dir.patch"
- # The following patch is a backport, it can be removed during the next bump
- "${FILESDIR}/${P}-skip-modperl-modpython-tests-cleaner.patch"
-)
-
-pkg_setup() {
- if use python || use test; then
- python-single-r1_pkg_setup
- fi
-}
-
-src_prepare() {
- # Let SWIG rebuild modperl/modpython to make user patching easier.
- if [[ ${PV} != *9999* ]]; then
- rm modules/modperl/generated.tar.gz || die
- rm modules/modpython/generated.tar.gz || die
- fi
-
- sed -i -e "s|DZNC_BIN_DIR:path=|DZNC_BIN_DIR:path=${T}/inttest|" \
- test/CMakeLists.txt || die
-
- sed -i "s|--datadir=|&${EPREFIX}|" znc.service.in || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DWANT_SYSTEMD=yes # Causes -DSYSTEMD_DIR to be used.
- -DSYSTEMD_DIR="$(systemd_get_systemunitdir)"
- -DWANT_ICU="$(usex icu)"
- -DWANT_ARGON="$(usex argon2)"
- -DWANT_IPV6=yes
- -DWANT_I18N="$(usex nls)"
- -DWANT_PERL="$(usex perl)"
- -DWANT_PYTHON="$(usex python)"
- -DWANT_PYTHON_VERSION="${EPYTHON#python}"
- -DWANT_CYRUS="$(usex sasl)"
- -DWANT_OPENSSL="$(usex ssl)"
- -DWANT_TCL="$(usex tcl)"
- -DWANT_ZLIB="$(usex zlib)"
- )
-
- if [[ ${PV} != *9999* ]] && use test; then
- export GTEST_ROOT="${WORKDIR}/googletest-${GTEST_VER}/googletest"
- export GMOCK_ROOT="${WORKDIR}/googletest-${GTEST_VER}/googlemock"
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- cmake_build unittest
- DESTDIR="${T}/inttest" cmake_build install
- local filter='-'
- if ! use perl; then
- filter="${filter}:ZNCTest.Modperl*"
- fi
- if ! use python; then
- filter="${filter}:ZNCTest.Modpython*"
- fi
- # CMAKE_PREFIX_PATH and CXXFLAGS are needed for znc-buildmod
- # invocations from inside the test
- GTEST_FILTER="${filter}" ZNC_UNUSUAL_ROOT="${T}/inttest" \
- CMAKE_PREFIX_PATH="${T}/inttest/usr/share/znc/cmake" \
- CXXFLAGS="${CXXFLAGS} -isystem ${T}/inttest/usr/include" \
- cmake_build inttest
-}
-
-src_install() {
- cmake_src_install
-
- dodoc NOTICE
- newinitd "${FILESDIR}"/znc.initd-r2 znc
- newconfd "${FILESDIR}"/znc.confd-r1 znc
-
- local DOC_CONTENTS
- # "local" has its own return value which is not what we want to catch
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") || die
- local DISABLE_AUTOFORMATTING=1
- readme.gentoo_create_doc
-}
-
-pkg_postinst() {
- if [[ -d "${EROOT}/var/lib/znc/.znc/" ]]; then
- eerror "${EROOT}/var/lib/znc/.znc/ exists, please move your data to ${EROOT}/var/lib/znc/"
- eerror ""
- eerror "The systemd unit has changed and now expects data to be located"
- eerror "at the root of ${EROOT}/var/lib/znc instead of its '.znc' subfolder."
- eerror "The recommended procedure to move the data is the following:"
- eerror "1. stop the service: systemctl stop znc.service"
- eerror "2. move the data: cp -a '${EROOT}/var/lib/znc/.znc/.' '${EROOT}/var/lib/znc/'"
- eerror "3. fix the config file: sed -i 's|${EROOT}/var/lib/znc/.znc|${EROOT}/var/lib/znc|g' '${EROOT}/var/lib/znc/configs/znc.conf'"
- eerror "4. restart znc: systemctl start znc.service"
- eerror "5. once everything works, remove the old data directory: rm -r '${EROOT}/var/lib/znc/.znc/'"
- eerror "See https://bugs.gentoo.org/743856 for details."
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- # This is a new installation
- readme.gentoo_print_elog
- fi
-}
-
-pkg_config() {
- if [[ -d "${EROOT}/var/lib/znc/configs" ]]; then
- ewarn "${EROOT}/var/lib/znc/configs/ already exists,"
- ewarn "aborting to avoid damaging any existing configuration."
- ewarn "If you are sure you want to generate a new configuration,"
- ewarn "remove the folder and try again."
- else
- einfo "Press enter to interactively create a new configuration file for znc."
- einfo "To abort, press Control-C"
- read
- su ${PN} -p -s /bin/sh -c 'ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \
- "${EROOT}"/usr/bin/znc --makeconf \
- --datadir "${EROOT}/var/lib/znc"' || die "Config failed"
- einfo
- einfo "You can now start the znc service using the init system of your choice."
- einfo "Don't forget to enable it if you want to use znc at boot."
- fi
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/, net-irc/znc/
@ 2016-03-21 13:11 Ian Delaney
0 siblings, 0 replies; 4+ messages in thread
From: Ian Delaney @ 2016-03-21 13:11 UTC (permalink / raw
To: gentoo-commits
commit: 942dfd926c80e680f564099f0b9535a2777c0245
Author: Louis Sautier <sautier.louis <AT> gmail <DOT> com>
AuthorDate: Sat Mar 19 17:10:18 2016 +0000
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Mon Mar 21 13:11:34 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=942dfd92
net-irc/znc: bump to 1.6.3, EAPI=6
- use the proper LICENSE
- remove the ZNC_DATADIR variable
- the libressl patch is no longer required → drop patch
- swig is not needed to build bindings from a release, removed from DEPEND
- configure uses python3 by default → don't specify it any more
- move informational postinst messages to a README.gentoo file
- fix the systemd unit by setting a valid HOME for the znc user
- delete the custom src_unpack function, provide the full path to gtest
Gentoo-Bug: https://bugs.gentoo.org/567344
Gentoo-Bug: https://bugs.gentoo.org/571366
Gentoo-Bug: https://bugs.gentoo.org/521916
Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/1086
net-irc/znc/Manifest | 1 +
net-irc/znc/files/README.gentoo | 22 +++++++
net-irc/znc/znc-1.6.3.ebuild | 126 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 149 insertions(+)
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest
index 2e4aebe..dc1f820 100644
--- a/net-irc/znc/Manifest
+++ b/net-irc/znc/Manifest
@@ -2,3 +2,4 @@ DIST gtest-1.7.0.zip 1164254 SHA256 247ca18dd83f53deb1328be17e4b1be31514cedfc1e3
DIST znc-1.2.tar.gz 1235150 SHA256 d9a2cd2a484ff23e6fc9cbde8dd8a43efbcd8d288afca7b1268914ca0d18701d SHA512 dff24e56127e5599d64b4c62de967d5d48d8ebf23ca8597d33bf0b3622640512db7a462bfa7c2031cd8307f402bab8efa345f6d1fc813e78eb0dcae581de3cf7 WHIRLPOOL b0810eb66e63be762f74f04eb2289e3634b18d6ecbd36d55f6a6772697e0397637d59b9ea01eaf62ef1cbe5f6e65b06432a254f4ada35194aa06b65c4a2f7994
DIST znc-1.4.tar.gz 1239648 SHA256 86e98fd0ed182d39828c926809f8075d836ee3b70a6dd43dfbb434822f2a7b52 SHA512 0c33b05e8232084999812cbaa467dc7d37b80cafc1001b82e89c702b4303d8db9a27b948fe653e7090404eb1c66f5492f02f3524bc39efabade4be8bdb476671 WHIRLPOOL 420e665fa193b3f0284a070e021c4c467e3d40a0812eedeef9b2f65a6626a050b7af8bf15a754ac571d12261705832cfa18a0f7a7817cce96d220028a86230cf
DIST znc-1.6.1.tar.gz 1463397 SHA256 ba49397364f48d6d32ae5242bc1166f21d972f85dd390d6bbe68a63ecbb6c140 SHA512 92c0acca6b585df394cf8d6d295948fc1342ff7b15d081017d2e0ba521129f914fa2b019a82d801f826f1009456294e4f578e978f34677bbfe436e87e2734aba WHIRLPOOL ff4a22742d5e1e8da66325fdc8a2fd88a467674a5f13f6d353b1c3588affd86f2c33c24d48f1b61dfba14311d6f1c13b2939851316cb302ab031073baa05ec17
+DIST znc-1.6.3.tar.gz 1464200 SHA256 631c46de76fe601a41ef7676bc974958e9a302b72b25fc92b4a603a25d89b827 SHA512 777279b6c973310b4e78a0472bd1e355c2adf3e4fbe9ebedde3dd4706e5c0b208d4330eb2318a8d9e0d7d7146bee0a4a428cbe5a3f230c8f6aa692a477e86e2b WHIRLPOOL 2a41e0ac90038a8cc8f289d4ffc0494d29eda75450f650b8870c076fb809eb9c5829720bb39eb43d38ee4ac7f9bea6000ad90fcdd8c0eea461bf04f88cc17b52
diff --git a/net-irc/znc/files/README.gentoo b/net-irc/znc/files/README.gentoo
new file mode 100644
index 0000000..5b222a2
--- /dev/null
+++ b/net-irc/znc/files/README.gentoo
@@ -0,0 +1,22 @@
+To run znc as a user, run 'znc --makeconf' to create a configuration file.
+
+If znc was compiled with the 'daemon' use flag, you may run
+ emerge --config znc
+to configure it.
+
+To generate a new SSL certificate, run:
+ znc --system-wide-config-as znc --makepem -d /var/lib/znc
+as root.
+
+If migrating from a user-based install, you can copy the existing
+configuration files:
+ mkdir /var/lib/znc
+ mv /home/$USER/.znc/* /var/lib/znc
+ rm -rf /home/$USER/.znc
+ chown -R znc:znc /var/lib/znc
+You may also adjust the location of the files and the user running znc
+in /etc/conf.d/znc instead.
+
+To run as a daemon, please make sure that your configuration contains
+ PidFile = /run/znc/znc.pid
+or that the PidFile value matches the one in /etc/conf.d/znc.
diff --git a/net-irc/znc/znc-1.6.3.ebuild b/net-irc/znc/znc-1.6.3.ebuild
new file mode 100644
index 0000000..eb37727
--- /dev/null
+++ b/net-irc/znc/znc-1.6.3.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{3_3,3_4,3_5} )
+inherit eutils python-single-r1 readme.gentoo-r1 systemd user
+
+MY_PV=${PV/_/-}
+GTEST_VER="1.7.0"
+GTEST_URL="https://googletest.googlecode.com/files/gtest-${GTEST_VER}.zip"
+DESCRIPTION="An advanced IRC Bouncer"
+
+SRC_URI="http://znc.in/releases/${PN}-${MY_PV}.tar.gz
+ test? ( ${GTEST_URL} )"
+KEYWORDS="~amd64 ~arm ~x86"
+
+HOMEPAGE="http://znc.in"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="daemon debug ipv6 libressl perl python ssl sasl tcl test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/icu:=
+ sys-libs/zlib
+ perl? ( >=dev-lang/perl-5.10 )
+ python? ( ${PYTHON_DEPS} )
+ sasl? ( >=dev-libs/cyrus-sasl-2 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ tcl? ( dev-lang/tcl:0= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.1-systemwideconfig.patch
+ "${FILESDIR}"/${PN}-1.6.1-create-pidfile-per-default.patch
+)
+
+pkg_setup() {
+ if use python; then
+ python-single-r1_pkg_setup
+ fi
+ if use daemon; then
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ # The home directory was previously set to /dev/null
+ # This caused a bug with the systemd unit
+ # https://bugs.gentoo.org/521916
+ esethome ${PN} /var/lib/${PN}
+ fi
+}
+
+src_configure() {
+ econf \
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir) \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable perl) \
+ $(use_enable python) \
+ $(use_enable sasl cyrus) \
+ $(use_enable ssl openssl) \
+ $(use_enable tcl tcl) \
+ $(use_with test gtest "${WORKDIR}/gtest-${GTEST_VER}")
+}
+
+src_install() {
+ emake install DESTDIR="${D%/}"
+ dodoc NOTICE README.md
+ if use daemon; then
+ newinitd "${FILESDIR}"/znc.initd-r1 znc
+ newconfd "${FILESDIR}"/znc.confd-r1 znc
+ fi
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo")
+ DISABLE_AUTOFORMATTING=1
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+ if [[ -d "${EROOT%/}"/etc/znc ]]; then
+ ewarn "/etc/znc exists on your system."
+ ewarn "Due to the nature of the contents of that folder,"
+ ewarn "we have changed the default configuration to use"
+ ewarn " /var/lib/znc"
+ ewarn "please move /etc/znc to /var/lib/znc"
+ ewarn "or adjust /etc/conf.d/znc"
+ fi
+}
+
+pkg_config() {
+ if use daemon; then
+ if [[ -e "${EROOT%/}/var/lib/znc" ]]; then
+ ewarn "${EROOT%/}/var/lib/znc already exists, aborting to avoid damaging"
+ ewarn "any existing configuration. If you are sure you want"
+ ewarn "to generate a new configuration, remove the folder"
+ ewarn "and try again."
+ else
+ einfo "Press any key to interactively create a new configuration file"
+ einfo "for znc."
+ einfo "To abort, press Control-C"
+ read
+ mkdir -p "${EROOT%/}/var/lib/znc" || die
+ chown -R ${PN}:${PN} "${EROOT%/}/var/lib/znc" ||
+ die "Setting permissions failed"
+ "${EROOT%/}"/usr/bin/znc --system-wide-config-as ${PN} -c -r -d "${EROOT%/}/var/lib/znc" ||
+ die "Config failed"
+ echo
+ einfo "To start znc, run '/etc/init.d/znc start'"
+ einfo "or add znc to a runlevel:"
+ einfo " rc-update add znc default"
+ fi
+ else
+ ewarn "To configure znc as a system-wide daemon you have to"
+ ewarn "enable the 'daemon' use flag."
+ fi
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/, net-irc/znc/
@ 2015-09-20 12:58 Julian Ospald
0 siblings, 0 replies; 4+ messages in thread
From: Julian Ospald @ 2015-09-20 12:58 UTC (permalink / raw
To: gentoo-commits
commit: 1fbc7d68335e35af898606f1dfdaedf9bf6bea14
Author: Julian Ospald <hasufell <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 12:57:34 2015 +0000
Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 12:58:23 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fbc7d68
net-irc/znc: add libressl support
net-irc/znc/files/znc-1.6.1-libressl.patch | 19 +++++
.../znc/{znc-9999.ebuild => znc-1.6.1-r1.ebuild} | 89 ++++++++++++++--------
net-irc/znc/znc-9999.ebuild | 7 +-
3 files changed, 83 insertions(+), 32 deletions(-)
diff --git a/net-irc/znc/files/znc-1.6.1-libressl.patch b/net-irc/znc/files/znc-1.6.1-libressl.patch
new file mode 100644
index 0000000..8bbe9cf
--- /dev/null
+++ b/net-irc/znc/files/znc-1.6.1-libressl.patch
@@ -0,0 +1,19 @@
+$OpenBSD: patch-src_Csocket_cpp,v 1.1 2014/07/12 14:42:37 pascal Exp $
+--- src/Csocket.cpp.orig Sat Jul 12 16:03:48 2014
++++ src/Csocket.cpp Sat Jul 12 16:04:36 2014
+@@ -555,6 +555,7 @@ bool InitSSL( ECompType eCompressionType )
+ }
+ #endif /* _WIN32 */
+
++#ifndef OPENSSL_NO_COMP
+ COMP_METHOD *cm = NULL;
+
+ if( CT_ZLIB & eCompressionType )
+@@ -570,6 +571,7 @@ bool InitSSL( ECompType eCompressionType )
+ if( cm )
+ SSL_COMP_add_compression_method( CT_RLE, cm );
+ }
++#endif
+
+ // setting this up once in the begining
+ g_iCsockSSLIdx = SSL_get_ex_new_index( 0, ( void * )"CsockGlobalIndex", NULL, NULL, NULL );
diff --git a/net-irc/znc/znc-9999.ebuild b/net-irc/znc/znc-1.6.1-r1.ebuild
similarity index 59%
copy from net-irc/znc/znc-9999.ebuild
copy to net-irc/znc/znc-1.6.1-r1.ebuild
index cff81dc..a6f8c03 100644
--- a/net-irc/znc/znc-9999.ebuild
+++ b/net-irc/znc/znc-1.6.1-r1.ebuild
@@ -5,20 +5,21 @@
EAPI=5
PYTHON_COMPAT=( python{3_3,3_4} )
-inherit autotools eutils python-single-r1 user
+inherit eutils python-single-r1 systemd user
MY_PV=${PV/_/-}
+GTEST_VER="1.7.0"
+GTEST_URL="https://googletest.googlecode.com/files/gtest-${GTEST_VER}.zip"
DESCRIPTION="An advanced IRC Bouncer"
-inherit git-r3
-EGIT_REPO_URI=${EGIT_REPO_URI:-"git://github.com/znc/znc.git"}
-SRC_URI=""
-KEYWORDS=""
+SRC_URI="http://znc.in/releases/${PN}-${MY_PV}.tar.gz
+ test? ( ${GTEST_URL} )"
+KEYWORDS="~amd64 ~arm ~x86"
HOMEPAGE="http://znc.in"
LICENSE="GPL-2"
SLOT="0"
-IUSE="daemon debug ipv6 perl python ssl sasl tcl"
+IUSE="daemon debug ipv6 libressl perl python ssl sasl tcl test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -28,7 +29,10 @@ RDEPEND="
perl? ( >=dev-lang/perl-5.10 )
python? ( ${PYTHON_DEPS} )
sasl? ( >=dev-libs/cyrus-sasl-2 )
- ssl? ( >=dev-libs/openssl-0.9.7d:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
tcl? ( dev-lang/tcl:0= )
"
DEPEND="${RDEPEND}
@@ -43,7 +47,13 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${PN}-${MY_PV}
-CONFDIR="/var/lib/znc"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.1-systemwideconfig.patch
+ "${FILESDIR}"/${PN}-1.6.1-create-pidfile-per-default.patch
+ "${FILESDIR}"/${PN}-1.6.1-libressl.patch
+)
+
+ZNC_DATADIR="${ZNC_DATADIR:-"/var/lib/znc"}"
pkg_setup() {
if use python; then
@@ -55,28 +65,36 @@ pkg_setup() {
fi
}
-src_prepare() {
- AT_M4DIR="${S}/m4" \
- eautoreconf
+src_unpack() {
+ default
+
+ if use test; then
+ cd "${S}"/test || die "Failed to chdir into '${S}/test'"
+ unpack ${GTEST_URL##*/}
+ mv gtest-${GTEST_VER} gtest \
+ || die "Failed to rename '${S}/test/gtest-${GTEST_VER}' dir"
+ fi
+}
- # build system quirk, it does not define AM_INIT_AUTOMAKE, nor
- # does it have Makefile.am in the root dir, but we need '--add-missing'
- automake --add-missing
+src_prepare() {
+ epatch ${PATCHES[@]}
}
src_configure() {
econf \
+ --with-systemdsystemunitdir=$(systemd_get_unitdir) \
$(use_enable debug) \
$(use_enable ipv6) \
$(use_enable perl) \
$(use python && echo "--enable-python=python3") \
$(use_enable sasl cyrus) \
$(use_enable ssl openssl) \
- $(use_enable tcl tcl)
+ $(use_enable tcl tcl) \
+ $(use_with test gtest "${S}/test/gtest")
}
src_install() {
- emake install DESTDIR="${D}"
+ emake install DESTDIR="${D%/}"
dodoc NOTICE README.md
if use daemon; then
newinitd "${FILESDIR}"/znc.initd-r1 znc
@@ -94,54 +112,65 @@ pkg_postinst() {
elog
elog "An init-script was installed in /etc/init.d"
elog "A config file was installed in /etc/conf.d"
- if [[ ! -d "${EROOT}${CONFDIR}" ]]; then
+ if [[ ! -d "${EROOT}${ZNC_DATADIR}" ]]; then
elog
elog "Run 'emerge --config znc' under portage"
elog "or 'cave config znc' under paludis to configure ZNC"
elog "as a system-wide daemon."
elog
elog "To generate a new SSL certificate, run:"
- elog " znc --system-wide-config-as znc --makepem -d ${CONFDIR}"
+ elog " znc --system-wide-config-as znc --makepem -d ${ZNC_DATADIR}"
elog "as root"
elog
elog "If migrating from a user-based install"
elog "you can use your existing config files:"
- elog " mkdir ${CONFDIR}"
- elog " mv /home/\$USER/.znc/* ${CONFDIR}"
+ elog " mkdir ${ZNC_DATADIR}"
+ elog " mv /home/\$USER/.znc/* ${ZNC_DATADIR}"
elog " rm -rf /home/\$USER/.znc"
- elog " chown -R znc:znc ${CONFDIR}"
+ elog " chown -R znc:znc ${ZNC_DATADIR}"
elog
elog "If you already have znc set up and want take advantage of the"
elog "init script but skip of all the above, you can also edit"
elog " /etc/conf.d/znc"
elog "and adjust the variables to your current znc user and config"
elog "location."
+ elog
+ elog "Please make sure that your existing configuration contains"
+ elog " PidFile = /run/znc/znc.pid"
+ elog "or that PidFile value matches the one in /etc/conf.d/znc"
if [[ -d "${EROOT}"/etc/znc ]]; then
elog
ewarn "/etc/znc exists on your system."
ewarn "Due to the nature of the contents of that folder,"
ewarn "we have changed the default configuration to use"
- ewarn " /var/lib/znc"
- ewarn "please move /etc/znc to /var/lib/znc"
+ ewarn " ${ZNC_DATADIR}"
+ ewarn "please move /etc/znc to ${ZNC_DATADIR}"
ewarn "or adjust /etc/conf.d/znc"
fi
else
- elog "Existing config detected in ${CONFDIR}"
- elog "You're good to go :)"
+ elog "Existing config detected in ${ZNC_DATADIR}"
+ if ! systemd_is_booted; then
+ elog
+ elog "Please make sure that your existing configuration contains"
+ elog " PidFile = /run/znc/znc.pid"
+ elog "or that PidFile value matches the one in /etc/conf.d/znc"
+ else
+ elog "You're good to go :)"
+ fi
fi
elog
fi
}
pkg_config() {
- if use daemon && ! [[ -d "${EROOT}${CONFDIR}" ]]; then
+ if use daemon && ! [[ -d "${EROOT}${ZNC_DATADIR}" ]]; then
einfo "Press ENTER to interactively create a new configuration file for znc."
einfo "To abort, press Control-C"
read
- mkdir -p "${EROOT}${CONFDIR}" || die
- chown -R ${PN}:${PN} "${EROOT}${CONFDIR}" ||
+ mkdir -p "${EROOT}${ZNC_DATADIR}" || die
+ chown -R ${PN}:${PN} "${EROOT}${ZNC_DATADIR}" ||
die "Setting permissions failed"
- "${EROOT}"/usr/bin/znc --system-wide-config-as znc -c -r -d "${EROOT}${CONFDIR}" ||
+ "${EROOT}"/usr/bin/znc --system-wide-config-as znc -c -r -d "${EROOT}${ZNC_DATADIR}" ||
die "Config failed"
echo
einfo "To start znc, run '/etc/init.d/znc start'"
@@ -149,7 +178,7 @@ pkg_config() {
einfo " rc-update add znc default"
else
if use daemon; then
- ewarn "${CONFDIR} already exists, aborting to avoid damaging"
+ ewarn "${ZNC_DATADIR} already exists, aborting to avoid damaging"
ewarn "any existing configuration. If you are sure you want"
ewarn "to generate a new configuration, remove the folder"
ewarn "and try again."
diff --git a/net-irc/znc/znc-9999.ebuild b/net-irc/znc/znc-9999.ebuild
index cff81dc..561efde 100644
--- a/net-irc/znc/znc-9999.ebuild
+++ b/net-irc/znc/znc-9999.ebuild
@@ -18,7 +18,7 @@ KEYWORDS=""
HOMEPAGE="http://znc.in"
LICENSE="GPL-2"
SLOT="0"
-IUSE="daemon debug ipv6 perl python ssl sasl tcl"
+IUSE="daemon debug ipv6 libressl perl python ssl sasl tcl"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -28,7 +28,10 @@ RDEPEND="
perl? ( >=dev-lang/perl-5.10 )
python? ( ${PYTHON_DEPS} )
sasl? ( >=dev-libs/cyrus-sasl-2 )
- ssl? ( >=dev-libs/openssl-0.9.7d:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
tcl? ( dev-lang/tcl:0= )
"
DEPEND="${RDEPEND}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-02 6:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 11:35 [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/, net-irc/znc/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-12-02 6:03 John Helmert III
2016-03-21 13:11 Ian Delaney
2015-09-20 12:58 Julian Ospald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox