[gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/, net-irc/znc/
commit: e77bccc40c96e94bac5fe1ba796f02c3f00544c2 Author: Alexey Sokolov asokolov org> AuthorDate: Fri Jan 5 08:58:49 2024 + Commit: Sam James gentoo org> CommitDate: Fri Jan 5 11:35:02 2024 + 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 asokolov.org> Closes: https://github.com/gentoo/gentoo/pull/34654 Signed-off-by: Sam James 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 ..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 +Date: Fri, 5 Jan 2024 02:19:55 + +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 +- 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**), 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(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>=0x0300 ++#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>=0x0300 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR) ++ if (PyBytes_AsStringAndSize(obj, , ) == -1) ++ return SWIG_TypeError; ++#else ++ cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, , ); ++ 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 { ++
[gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/
commit: e4bc068f905f39108da4c40fb210cea20ba3e25f Author: Louis Sautier gentoo org> AuthorDate: Sat Jan 8 01:57:52 2022 + Commit: Louis Sautier gentoo org> CommitDate: Sat Jan 8 01:59:44 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4bc068f net-irc/znc: display qualified package name in README Signed-off-by: Louis Sautier gentoo.org> net-irc/znc/files/README.gentoo-r1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net-irc/znc/files/README.gentoo-r1 b/net-irc/znc/files/README.gentoo-r1 index 1812383beb29..8fa94e2f0775 100644 --- a/net-irc/znc/files/README.gentoo-r1 +++ b/net-irc/znc/files/README.gentoo-r1 @@ -1,6 +1,6 @@ To run znc as a user, run 'znc --makeconf' to create a configuration file. -To configure the system-wide daemon, you may run 'emerge --config znc'. +To configure the system-wide daemon, you may run 'emerge --config net-irc/znc'. If migrating from a user-based install, you can copy the existing configuration files:
[gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/
commit: bbd5adeecb8da210b6aa45883c74d904c14fc301 Author: Alexey Sokolov google com> AuthorDate: Sun Jun 17 10:22:54 2018 + Commit: Michał Górny gentoo org> CommitDate: Sun Jun 17 12:46:09 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbd5adee net-irc/znc: remove non-referenced files Closes: https://github.com/gentoo/gentoo/pull/8873 net-irc/znc/files/znc-1.0-systemwideconfig.patch | 147 --- net-irc/znc/files/znc.confd | 7 -- net-irc/znc/files/znc.initd | 38 -- 3 files changed, 192 deletions(-) diff --git a/net-irc/znc/files/znc-1.0-systemwideconfig.patch b/net-irc/znc/files/znc-1.0-systemwideconfig.patch deleted file mode 100644 index 336163dd6a0..000 --- a/net-irc/znc/files/znc-1.0-systemwideconfig.patch +++ /dev/null @@ -1,147 +0,0 @@ -diff --git a/include/znc/znc.h b/include/znc/znc.h -index 03be646..f493c83 100644 a/include/znc/znc.h -+++ b/include/znc/znc.h -@@ -169,6 +169,8 @@ public: - - static void DumpConfig(const CConfig* Config); - -+ void SetSystemWideConfig(bool systemWideConfig); -+ - private: - CFile* InitPidFile(); - bool DoRehash(CString& sError); -@@ -209,6 +211,7 @@ protected: - unsigned int m_uiConnectPaused; - TCacheMap m_sConnectThrottle; - bool m_bProtectWebSessions; -+ bool m_bSystemWideConfig; - }; - - #endif // !_ZNC_H -diff --git a/src/main.cpp b/src/main.cpp -index a1f3904..4950911 100644 a/src/main.cpp -+++ b/src/main.cpp -@@ -10,6 +10,9 @@ - #include - #include - #include -+#include -+#include -+#include - - using std::cout; - using std::endl; -@@ -46,6 +49,7 @@ static const struct option g_LongOpts[] = { - { "makepass",no_argument, 0, 's' }, - { "makepem", no_argument, 0, 'p' }, - { "datadir", required_argument, 0, 'd' }, -+ { "system-wide-config-as", required_argument, 0, 'S' }, - { 0, 0, 0, 0 } - }; - -@@ -127,6 +131,8 @@ int main(int argc, char** argv) { - bool bMakeConf = false; - bool bMakePass = false; - bool bAllowRoot = false; -+ bool bSystemWideConfig = false; -+ CString sSystemWideConfigUser = "znc"; - bool bForeground = false; - #ifdef ALWAYS_RUN_IN_FOREGROUND - bForeground = true; -@@ -135,7 +141,7 @@ int main(int argc, char** argv) { - bool bMakePem = false; - #endif - -- while ((iArg = getopt_long(argc, argv, "hvnrcspd:Df", g_LongOpts, )) != -1) { -+ while ((iArg = getopt_long(argc, argv, "hvnrcspd:DfS:", g_LongOpts, )) != -1) { - switch (iArg) { - case 'h': - GenerateHelp(argv[0]); -@@ -153,6 +159,10 @@ int main(int argc, char** argv) { - case 'c': - bMakeConf = true; - break; -+ case 'S': -+ bSystemWideConfig = true; -+ sSystemWideConfigUser = optarg; -+ break; - case 's': - bMakePass = true; - break; -@@ -187,8 +197,36 @@ int main(int argc, char** argv) { - return 1; - } - -+ if (bSystemWideConfig && getuid() == 0) { -+ struct passwd *pwd; -+ -+ pwd = getpwnam(sSystemWideConfigUser.c_str()); -+ if (pwd == NULL) { -+ CUtils::PrintError("Daemon user not found."); -+ return 1; -+ } -+ -+ if ((long) pwd->pw_uid == 0) { -+ CUtils::PrintError("Please define a daemon user other than root."); -+ return 1; -+ } -+ if (setgroups(0, NULL) != 0) { -+ CUtils::PrintError("setgroups: Unable to clear supplementary group IDs"); -+ return 1; -+ } -+ if (setgid((long) pwd->pw_gid) != 0) { -+ CUtils::PrintError("setgid: Unable to drop group privileges"); -+ return 1; -+ } -+ if (setuid((long) pwd->pw_uid) != 0) { -+ CUtils::PrintError("setuid: Unable to drop user privileges"); -+ return 1; -+ } -+ } -+ - CZNC* pZNC = ::Get(); - pZNC->InitDirs(((argc) ? argv[0] : ""), sDataDir); -+ pZNC->SetSystemWideConfig(bSystemWideConfig); - - #ifdef HAVE_LIBSSL - if (bMakePem) { -@@ -229,7 +267,7 @@ int main(int argc, char** argv) { - CUtils::PrintStatus(true, ""); - } - -- if (isRoot()) { -+ if (isRoot() && !bSystemWideConfig) { - CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid"); - CUtils::PrintError("reasons for this and it can, in theory, cause great damage!"); -
[gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/
commit: 9198b2553a860df49728249505cedfb9780f968c Author: Michael Mair-Keimberger (asterix) gmail com> AuthorDate: Sun Jan 8 12:23:30 2017 + Commit: Göktürk Yüksek gentoo org> CommitDate: Sun Jan 15 02:31:49 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9198b255 net-irc/znc: remove unused patches ...2-webadmin-correctly-handle-channel-names.patch | 73 -- net-irc/znc/files/znc-1.6.1-libressl.patch | 19 -- 2 files changed, 92 deletions(-) diff --git a/net-irc/znc/files/znc-1.2-webadmin-correctly-handle-channel-names.patch b/net-irc/znc/files/znc-1.2-webadmin-correctly-handle-channel-names.patch deleted file mode 100644 index 93705f7.. --- a/net-irc/znc/files/znc-1.2-webadmin-correctly-handle-channel-names.patch +++ /dev/null @@ -1,73 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=507794 - -From 5e6e3be32acfeadeaf1fb3bb17bada08aec6432f Mon Sep 17 00:00:00 2001 -From: Uli Schlachter-Date: Sun, 13 Apr 2014 20:36:55 +0200 -Subject: [PATCH] webadmin/add channel: Correctly handle channel names - -The CChan constructor makes sure that the channel name begins with a valid -channel prefix. Thus, this could change the name of the resulting channel. - -When you edited an irc network which already had a channel "#foo", were -connected to IRC (so ZNC knows which prefixes are valid) and added a channel -"foo", this would lead to a problem: - -Webadmin checks and sees that there is no channel "foo" yet. Webadmin creates a -new CChan instance for "foo". The CChan constructor notices that "f" is not a -valid channel prefix and instead calls itself "#foo". Then, -CIRCNetwork::AddChan() would see that this channel already exists, delete the -given channel and return false. - -However, webadmin didn't check this result and would continue changing settings -on an already destroyed CChan instance. - -Fix this by checking if the channel exists after CChan had its chance to mess -with the channel name. Also handle failures from CIRCNetwork::AddChan(). - -Fixes #528. - -Signed-off-by: Uli Schlachter - modules/webadmin.cpp | 16 +++- - 1 file changed, 11 insertions(+), 5 deletions(-) - -diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp -index 40a28d3..90ddfd2 100644 a/modules/webadmin.cpp -+++ b/modules/webadmin.cpp -@@ -668,13 +668,19 @@ class CWebAdminMod : public CModule { - return true; - } - -- if (pNetwork->FindChan(sChanName.Token(0))) { -- WebSock.PrintErrorPage("Channel [" + sChanName.Token(0) + "] already exists"); -+ // This could change the channel name and e.g. add a "#" prefix -+ pChan = new CChan(sChanName, pNetwork, true); -+ -+ if (pNetwork->FindChan(pChan->GetName())) { -+ WebSock.PrintErrorPage("Channel [" + pChan->GetName() + "] already exists"); -+ delete pChan; - return true; - } - -- pChan = new CChan(sChanName, pNetwork, true); -- pNetwork->AddChan(pChan); -+ if (!pNetwork->AddChan(pChan)) { -+ WebSock.PrintErrorPage("Could not add channel [" + pChan->GetName() + "]"); -+ return true; -+ } - } - - pChan->SetBufferCount(WebSock.GetParam("buffercount").ToUInt(), spSession->IsAdmin()); -@@ -700,7 +706,7 @@ class CWebAdminMod : public CModule { - - CTemplate TmplMod; - TmplMod["User"] = pUser->GetUserName(); -- TmplMod["ChanName"] = sChanName; -+ TmplMod["ChanName"] = pChan->GetName(); - TmplMod["WebadminAction"] = "change"; - FOR_EACH_MODULE(it, pNetwork) { - (*it)->OnEmbeddedWebRequest(WebSock, "webadmin/channel", TmplMod); --- -1.9.1 - diff --git a/net-irc/znc/files/znc-1.6.1-libressl.patch b/net-irc/znc/files/znc-1.6.1-libressl.patch deleted file mode 100644 index 8bbe9cf.. --- a/net-irc/znc/files/znc-1.6.1-libressl.patch +++ /dev/null @@ -1,19 +0,0 @@ -$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.cppSat 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 =
[gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/, net-irc/znc/
commit: 942dfd926c80e680f564099f0b9535a2777c0245 Author: Louis Sautier gmail com> AuthorDate: Sat Mar 19 17:10:18 2016 + Commit: Ian Delaney gentoo org> CommitDate: Mon Mar 21 13:11:34 2016 + 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 000..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 000..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?
[gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/, net-irc/znc/
commit: 1fbc7d68335e35af898606f1dfdaedf9bf6bea14 Author: Julian Ospald gentoo org> AuthorDate: Sun Sep 20 12:57:34 2015 + Commit: Julian Ospald gentoo org> CommitDate: Sun Sep 20 12:58:23 2015 + 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-.ebuild => znc-1.6.1-r1.ebuild} | 89 ++ net-irc/znc/znc-.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 000..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.cppSat 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-.ebuild b/net-irc/znc/znc-1.6.1-r1.ebuild similarity index 59% copy from net-irc/znc/znc-.ebuild copy to net-irc/znc/znc-1.6.1-r1.ebuild index cff81dc..a6f8c03 100644 --- a/net-irc/znc/znc-.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}"
[gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/
commit: a1caf33ff9b18692b73acb925371658a57794ad0 Author: Julian Ospald gentoo org> AuthorDate: Tue Sep 15 15:12:13 2015 + Commit: Julian Ospald gentoo org> CommitDate: Tue Sep 15 15:40:15 2015 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1caf33f net-irc/znc: improve quoting in init file net-irc/znc/files/znc.initd-r1 | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net-irc/znc/files/znc.initd-r1 b/net-irc/znc/files/znc.initd-r1 index 903a4fe..a6ef740 100644 --- a/net-irc/znc/files/znc.initd-r1 +++ b/net-irc/znc/files/znc.initd-r1 @@ -6,7 +6,7 @@ extra_commands="config" extra_started_commands="reload save" command="/usr/bin/znc" -command_args="--datadir ${ZNC_DATADIR}" +command_args="--datadir \"${ZNC_DATADIR}\"" pidfile="${ZNC_PIDFILE:-/run/znc/znc.pid}" user=${ZNC_USER:-znc} group=${ZNC_GROUP:-znc} @@ -20,21 +20,21 @@ depend() { } start_pre() { - checkpath -d -m 0770 -o ${user}:${group} $(dirname ${pidfile}) + checkpath -d -m 0770 -o ${user}:${group} "$(dirname ${pidfile})" } stop_post() { - rm -f ${pidfile} + rm -f "${pidfile}" } reload() { ebegin "Reloading ZNC Configuration File from Disk" - start-stop-daemon --signal SIGHUP --pidfile ${pidfile} + start-stop-daemon --signal SIGHUP --pidfile "${pidfile}" eend $? } save() { ebegin "Saving ZNC Configuration File to Disk" - start-stop-daemon --signal SIGUSR1 --pidfile ${pidfile} + start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}" eend $? }