summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <sokolov@google.com>2018-06-19 02:13:38 +0100
committerLouis Sautier <sbraz@gentoo.org>2018-07-04 23:33:36 +0200
commit15112014e7605d13624297d7601504b5d187a6de (patch)
treec7b82be7b5486613e03b0a4257a05bfe2a2f105b /net-irc/znc/files
parentRevert "dev-lang/squirrel: declare used CMake variables, bug #659880" (diff)
downloadgentoo-15112014e7605d13624297d7601504b5d187a6de.tar.gz
gentoo-15112014e7605d13624297d7601504b5d187a6de.tar.bz2
gentoo-15112014e7605d13624297d7601504b5d187a6de.zip
net-irc/znc: enable integration testing
Closes: https://github.com/gentoo/gentoo/pull/8901
Diffstat (limited to 'net-irc/znc/files')
-rw-r--r--net-irc/znc/files/znc-1.7.0-inttest-dir.patch55
-rw-r--r--net-irc/znc/files/znc-1.7.0-inttest-fix-make-warning.patch26
2 files changed, 81 insertions, 0 deletions
diff --git a/net-irc/znc/files/znc-1.7.0-inttest-dir.patch b/net-irc/znc/files/znc-1.7.0-inttest-dir.patch
new file mode 100644
index 000000000000..250eccc53fb6
--- /dev/null
+++ b/net-irc/znc/files/znc-1.7.0-inttest-dir.patch
@@ -0,0 +1,55 @@
+diff --git a/include/znc/znc.h b/include/znc/znc.h
+index ecb2b41a..a791a648 100644
+--- a/include/znc/znc.h
++++ b/include/znc/znc.h
+@@ -251,6 +251,7 @@ class CZNC : private CCoreTranslationMixin {
+ void DisableConfigTimer();
+
+ static void DumpConfig(const CConfig* Config);
++ static CString UnusualRoot();
+
+ private:
+ static CString FormatBindError();
+diff --git a/src/Modules.cpp b/src/Modules.cpp
+index 5aec7805..6f9c34ae 100644
+--- a/src/Modules.cpp
++++ b/src/Modules.cpp
+@@ -1899,9 +1899,10 @@ CModules::ModDirList CModules::GetModDirs() {
+ sDir = CZNC::Get().GetModPath() + "/";
+ ret.push(std::make_pair(sDir, sDir));
+
++ CString sUnusualRoot = CZNC::UnusualRoot();
+ // <moduledir> and <datadir> (<prefix>/lib/znc)
+- ret.push(std::make_pair(_MODDIR_ + CString("/"),
+- _DATADIR_ + CString("/modules/")));
++ ret.push(std::make_pair(sUnusualRoot + _MODDIR_ + CString("/"),
++ sUnusualRoot + _DATADIR_ + CString("/modules/")));
+
+ return ret;
+ }
+diff --git a/src/WebModules.cpp b/src/WebModules.cpp
+index 19ece50a..8ea4d9fa 100644
+--- a/src/WebModules.cpp
++++ b/src/WebModules.cpp
+@@ -563,7 +563,7 @@ CString CWebSock::GetSkinPath(const CString& sSkinName) {
+ sRet = CZNC::Get().GetCurPath() + "/webskins/" + sSkinName;
+
+ if (!CFile::IsDir(sRet)) {
+- sRet = CString(_SKINDIR_) + "/" + sSkinName;
++ sRet = CZNC::UnusualRoot() + CString(_SKINDIR_) + "/" + sSkinName;
+ }
+ }
+
+diff --git a/src/znc.cpp b/src/znc.cpp
+index 4e7216ee..dd901497 100644
+--- a/src/znc.cpp
++++ b/src/znc.cpp
+@@ -2130,3 +2130,8 @@ void CZNC::DisableConfigTimer() {
+ m_pConfigTimer = nullptr;
+ }
+ }
++
++CString CZNC::UnusualRoot() {
++ char* szUnusualRoot = getenv("ZNC_UNUSUAL_ROOT");
++ return szUnusualRoot ? szUnusualRoot : "";
++}
diff --git a/net-irc/znc/files/znc-1.7.0-inttest-fix-make-warning.patch b/net-irc/znc/files/znc-1.7.0-inttest-fix-make-warning.patch
new file mode 100644
index 000000000000..0be20e4c08d0
--- /dev/null
+++ b/net-irc/znc/files/znc-1.7.0-inttest-fix-make-warning.patch
@@ -0,0 +1,26 @@
+From abee9f9bfc8c9ca9d4616238fdd812c4200b17d5 Mon Sep 17 00:00:00 2001
+From: Alexey Sokolov <alexey+znc@asokolov.org>
+Date: Thu, 28 Jun 2018 23:57:29 +0100
+Subject: [PATCH] Fix a warning in integration test / gmake / znc-buildmod
+ interaction.
+
+It was requested on https://github.com/gentoo/gentoo/pull/8901
+---
+ test/CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index b19c22fab..296cb0de7 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -85,5 +85,10 @@ externalproject_add(inttest_bin
+ "-DZNC_BIN_DIR:path=${CMAKE_INSTALL_FULL_BINDIR}"
+ "-DQt5_HINTS:path=${brew_qt5}")
+ add_custom_target(inttest COMMAND
++ # Prevent a warning from test of znc-buildmod, when inner make
++ # discovers that there is an outer make and tries to use it:
++ # gmake[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
++ # This option doesn't affect ninja, which doesn't show that warning anyway.
++ ${CMAKE_COMMAND} -E env MAKEFLAGS=
+ "${CMAKE_CURRENT_BINARY_DIR}/integration/inttest")
+ add_dependencies(inttest inttest_bin)