summaryrefslogtreecommitdiff
path: root/net-irc/znc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-05 14:04:26 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-05 14:04:26 +0000
commit8fd9d385e5bc3c01115ec2ddcb2227607eb90861 (patch)
treeaba1e6ef6b95e94172c009394cd1fcbc383e7d6e /net-irc/znc
parent1ddcee0bd115d2f843f82061cb0d1741bf90151d (diff)
gentoo auto-resync : 05:01:2024 - 14:04:25
Diffstat (limited to 'net-irc/znc')
-rw-r--r--net-irc/znc/Manifest3
-rw-r--r--net-irc/znc/files/znc-1.8.2-fix-swig-2.patch123
-rw-r--r--net-irc/znc/znc-1.8.2-r2.ebuild3
3 files changed, 127 insertions, 2 deletions
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest
index c70bfc08ac83..7deadae1c827 100644
--- a/net-irc/znc/Manifest
+++ b/net-irc/znc/Manifest
@@ -3,12 +3,13 @@ AUX znc-1.7.1-inttest-dir.patch 2205 BLAKE2B f322f6884170c71ba537897d38c5ca27879
AUX znc-1.8.2-add-libera.patch 2205 BLAKE2B 756ddf827d4f39ac52c031ccdc13e07eddbcc079e37248ca3fa82bab5f9b90a1cf6faffd8d9a0c81a2c6a3ef912bfb314f3e03f657fd15bdadb61b0c7887fa1a SHA512 06c1a9f6a2729ed557f89ec247d89a87bca70b8a36103dbb1e230e7816df5155950f08f39b1011a0925354c073d4c3570f7918e730d01ad2c6ed3cdbf4b6df6c
AUX znc-1.8.2-fix-odr-violation.patch 1661 BLAKE2B 5ab47fe8bc3e7072f7c8107bb92a0d61702f3900101aef8fcde818640d1fe1683a236cfd287d4139f8ef1db597979b73ed5bb65d159af23d3b51b2ae5a772c58 SHA512 ab219b2faf6ad4d4e3aeb3da5f1362625fb9c16ce71366031f718d879120d57280e57ad5857e3f683af3f3678061e6bb77e00f2fdf925d177a4b7b8bd53ece93
AUX znc-1.8.2-fix-python-3.10.patch 997 BLAKE2B b2be81e71483ea64912db8511dd9cb8ff92b2a7ea3b5d23f57fccd349c0e86d147d9245c5cbd54f99640e198b312847d6a14a256627f0f69d114f214f11dc6a8 SHA512 d39548a34ccf23a814f8b9b7b50fc87f470932e717db079bd3aea4f47e093cf10daa36f003dd1de33e0e493e43de8d5e2e354d5cc881326b249003870408c3aa
+AUX znc-1.8.2-fix-swig-2.patch 3911 BLAKE2B dcc0603cd89223b75116709fb3fa51f8d9804dd63268c917665e3d5950c71783481294ccf711603d6375b93bf66b900a6acb95667967b2bab797eeebf32a9763 SHA512 878657bcec24a1f2695096a38aeedbdf8ea1a6d4722d001765641c0920295935b7ecb460b05be0d46684d095c87d8b81e4410e5793a31b133a3b6f2686351344
AUX znc-1.8.2-fix-swig.patch 1506 BLAKE2B 93055d76cd6ff429f3052b3774db209dd3acf48a2b599874aa2ac44f71cc218f8f8aaf030428c75272874ea156817fccaeb12ababb49ed59fb3433e251082fd3 SHA512 f2923a98467231ca97d7bdb937ad96a36a464a935319f482b03f857ade88b6402b0a16205eaadddca3750483a4dc36db3d2acb33074ca1883507d72b64d8b80c
AUX znc-1.8.2-fix-systemd-datadir.patch 692 BLAKE2B d6585fc5c2087b51c8c2277eb1c8f70585cad3621fcaa0f746a918a1f5e9f5455a8ca8dcbc6e73c0200e723d2fd6e3f4080d3a1d185fc9cc2dd3b14dcd80908a SHA512 d54f36cd4da9bb2d67852e2d7f302538fd2807d95b3480b4416fbf1d7a4d010a03a06e8f20c3f8907ea8d33d1be4872a4433c3db30530327fcfb39f43ada0b23
AUX znc.confd-r1 720 BLAKE2B 4857a8bcd36ed1008a558ac7b067d6fad53b5d39c0df9130ca28d4ac3db3924a3a1200682c19c7e6f7869f22338b492f73bf6ccbc2b723d117c9eebc10a89838 SHA512 3ab102f64ea0572350c8595fd3739874da591c43a3dbc3a740c72c53bd7418fded721d478d1fb92de0c0d18131313ba6679e842a135dfe239ea3f42821d8e468
AUX znc.initd-r2 952 BLAKE2B 81346bf0a1581543683eb5c125b29474c0bc01b8aee11c036a134c5a01042059564f2982aaec65715ac0a2c87b64fcd9746464148a81daeee549f4228d6ff55f SHA512 c3d676796aaa485dcaebee0fba58a8f86560cd192e0e2ccf06f58346c1368f58aa5be1c1e5160f8105e3dc5c684d3d1f82eff6a4d7b87c07f11450b72288727f
DIST gtest-1.8.1.tar.gz 992298 BLAKE2B 40ef3417fe424205c0617f07207347ce671ac87605f8ac9b8a333b0b06e3fbef9f556041ee324c18f957f3258ab9fe06704f31cdd038355fb7890180eb77ced1 SHA512 e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7
DIST znc-1.8.2.tar.gz 2101215 BLAKE2B 7f0e5840fe57cc6b6549115b0fcf02e6afd3be0bf52e79da0a39bcc1463d983cbeb504bad30f3d2f7582f0295c7210d3c1eec40ec87bcc3546ba2d21a67cca9e SHA512 e821647b50698c3a82fad039e69943e030bf644d8f8e82afa87c6c11da44761bceecddd510a7a956a1b487b1cca6ee46e8ac8818ea03127f0f1ff8f5d1a1a7f9
-EBUILD znc-1.8.2-r2.ebuild 5610 BLAKE2B c6db44a5485f8c618142ca0d0a86386c323204b5ff08ad44303f7432eea5e7cf121a0d09b0333bf5afa7e2fa028ad5903b81486ef5b5af7828b3ae8e8113056c SHA512 06c3090bf39b5969db0ee691a06ce1152f3c29ffa8800a5ee520d0917e3da4343daeac22a3506043169f88cb85c47e805541e16358bfea5f2decfa5c60e8d4cc
+EBUILD znc-1.8.2-r2.ebuild 5647 BLAKE2B 276b9611f95d3453a2e8359c364b2278e6710636379985043222991ce773250bbc42134e12c3c13f31d0ae93d54eb669b273be58507b836f84534c97e2b60c87 SHA512 99d46a73dc90c2eb9dd4e26803d6384a10b55f006de1640d149d2c35efabfb9a50cff6346620cb87876314ada41d16aa5fd579d9cfa4bc34132267fe61afe422
EBUILD znc-9999.ebuild 5503 BLAKE2B 892178ccca7e571f7b2e3849cb7e5ae19953ace415d607f78fb1489f315af9c583c5304fedf11e5ea0642872aa909b0c473c2dd576ab741c89c733001bde509d SHA512 1274bd1a7419b859252a84795b2f9f672cc2f5bd6d954e856301d81c4f7a04daa77c4a1bc3b23cb9f253befdd773b14837cf4ca6f1bd6cf93499cb2c6a812039
MISC metadata.xml 508 BLAKE2B 55a9f6a41856dfab6261b5cc23afa06756835fd740253084e06cfa53afcf6036974aeb5455373f43432515a5a88f476471ef9fa8bb38b30b8335af469eabf0c2 SHA512 5974ad23cb5256888b7b9c2c34a6fdbe46efb3e48bc075a3ebf09612bdb70ac27b56fd0bab13e1ada8234e2a3dce725aa8fc2bcf8e5248227f27e6e8a371c438
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() {