1 |
commit: 3e279c58bee61b557823357a52b23c101902807d |
2 |
Author: Louis Sautier <sautier.louis <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Jun 23 21:32:22 2017 +0000 |
4 |
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 23 22:29:28 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e279c58 |
7 |
|
8 |
net-nntp/nzbget: fix compilation of pre2021 with USE=-parcheck |
9 |
|
10 |
Gentoo-Bug: 622532 |
11 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/4977 |
13 |
|
14 |
.../nzbget-19.0_pre2021-fix-no-parcheck.patch | 46 ++++++++++++++++++++++ |
15 |
net-nntp/nzbget/nzbget-19.0_pre2021.ebuild | 2 + |
16 |
2 files changed, 48 insertions(+) |
17 |
|
18 |
diff --git a/net-nntp/nzbget/files/nzbget-19.0_pre2021-fix-no-parcheck.patch b/net-nntp/nzbget/files/nzbget-19.0_pre2021-fix-no-parcheck.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..e87fb7ced1a |
21 |
--- /dev/null |
22 |
+++ b/net-nntp/nzbget/files/nzbget-19.0_pre2021-fix-no-parcheck.patch |
23 |
@@ -0,0 +1,46 @@ |
24 |
+From 928e0a60061d33252de0b490c80477e77dde0627 Mon Sep 17 00:00:00 2001 |
25 |
+From: Andrey Prygunkov <hugbug@×××××××××××××××××.net> |
26 |
+Date: Fri, 23 Jun 2017 23:22:49 +0200 |
27 |
+Subject: [PATCH] fixed #399: error when compiling without par-check |
28 |
+ |
29 |
+--- |
30 |
+ daemon/queue/DirectRenamer.cpp | 5 ++++- |
31 |
+ 1 file changed, 4 insertions(+), 1 deletion(-) |
32 |
+ |
33 |
+diff --git a/daemon/queue/DirectRenamer.cpp b/daemon/queue/DirectRenamer.cpp |
34 |
+index 585ce941..2dd0f95b 100644 |
35 |
+--- a/daemon/queue/DirectRenamer.cpp |
36 |
++++ b/daemon/queue/DirectRenamer.cpp |
37 |
+@@ -51,6 +51,7 @@ class RenameContentAnalyzer : public ArticleContentAnalyzer |
38 |
+ bool m_parFile = false; |
39 |
+ }; |
40 |
+ |
41 |
++#ifndef DISABLE_PARCHECK |
42 |
+ class DirectParRepairer : public Par2::Par2Repairer |
43 |
+ { |
44 |
+ public: |
45 |
+@@ -161,7 +162,7 @@ void DirectParLoader::LoadParFile(const char* parFile) |
46 |
+ m_parHashes.emplace_back(filename.c_str(), hash.c_str()); |
47 |
+ } |
48 |
+ } |
49 |
+- |
50 |
++#endif |
51 |
+ |
52 |
+ std::unique_ptr<ArticleContentAnalyzer> DirectRenamer::MakeArticleContentAnalyzer() |
53 |
+ { |
54 |
+@@ -219,6 +220,7 @@ void DirectRenamer::FileDownloaded(DownloadQueue* downloadQueue, FileInfo* fileI |
55 |
+ |
56 |
+ void DirectRenamer::CheckState(DownloadQueue* downloadQueue, NzbInfo* nzbInfo) |
57 |
+ { |
58 |
++#ifndef DISABLE_PARCHECK |
59 |
+ if (nzbInfo->GetDirectRenameStatus() > NzbInfo::tsRunning) |
60 |
+ { |
61 |
+ return; |
62 |
+@@ -270,6 +272,7 @@ void DirectRenamer::CheckState(DownloadQueue* downloadQueue, NzbInfo* nzbInfo) |
63 |
+ return; |
64 |
+ } |
65 |
+ } |
66 |
++#endif |
67 |
+ } |
68 |
+ |
69 |
+ // Unpause smallest par-files from each par-set |
70 |
|
71 |
diff --git a/net-nntp/nzbget/nzbget-19.0_pre2021.ebuild b/net-nntp/nzbget/nzbget-19.0_pre2021.ebuild |
72 |
index c6d86f04383..6abcc452e54 100644 |
73 |
--- a/net-nntp/nzbget/nzbget-19.0_pre2021.ebuild |
74 |
+++ b/net-nntp/nzbget/nzbget-19.0_pre2021.ebuild |
75 |
@@ -33,6 +33,8 @@ DOCS=( ChangeLog README nzbget.conf ) |
76 |
|
77 |
S=${WORKDIR}/${PN}-${PV/_pre*/-testing} |
78 |
|
79 |
+PATCHES=( "${FILESDIR}/${P}-fix-no-parcheck.patch" ) |
80 |
+ |
81 |
check_compiler() { |
82 |
if [[ ${MERGE_TYPE} != binary ]] && ! test-flag-CXX -std=c++14; then |
83 |
eerror "${P} requires a C++14-capable compiler. Your current compiler" |