1 |
commit: d4931ad3ae7ed96249a4fef52dfb82b22d675577 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 31 14:57:30 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 31 14:57:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4931ad3 |
7 |
|
8 |
net-analyzer/portmon: Fix CFLAGS=-fno-common |
9 |
|
10 |
Package-Manager: Portage-2.3.86, Repoman-2.3.20 |
11 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=707208 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
.../portmon/files/portmon-2.0-fno-common.patch | 58 ++++++++++++++++++++++ |
15 |
net-analyzer/portmon/portmon-2.0-r1.ebuild | 33 ++++++++++++ |
16 |
2 files changed, 91 insertions(+) |
17 |
|
18 |
diff --git a/net-analyzer/portmon/files/portmon-2.0-fno-common.patch b/net-analyzer/portmon/files/portmon-2.0-fno-common.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..bfe6a914635 |
21 |
--- /dev/null |
22 |
+++ b/net-analyzer/portmon/files/portmon-2.0-fno-common.patch |
23 |
@@ -0,0 +1,58 @@ |
24 |
+--- a/src/portmon.c |
25 |
++++ b/src/portmon.c |
26 |
+@@ -35,6 +35,15 @@ |
27 |
+ #include <getopt.h> |
28 |
+ #endif |
29 |
+ |
30 |
++int report_flag; |
31 |
++int daemonize_flag; |
32 |
++ |
33 |
++struct host_struct *hosts; |
34 |
++char *err_msg; |
35 |
++char logfile[STRLARGE]; |
36 |
++int timeout; |
37 |
++int verbose; |
38 |
++ |
39 |
+ void version(void) |
40 |
+ { |
41 |
+ printf("This is %s, version %s\n", PACKAGE, VERSION); |
42 |
+--- a/src/portmon.h |
43 |
++++ b/src/portmon.h |
44 |
+@@ -31,8 +31,8 @@ |
45 |
+ #define STRLARGE 512 |
46 |
+ |
47 |
+ // flags |
48 |
+-int report_flag; |
49 |
+-int daemonize_flag; |
50 |
++extern int report_flag; |
51 |
++extern int daemonize_flag; |
52 |
+ |
53 |
+ struct port |
54 |
+ { |
55 |
+@@ -43,7 +43,7 @@ |
56 |
+ }; |
57 |
+ |
58 |
+ // create an array of hosts |
59 |
+-struct host_struct |
60 |
++extern struct host_struct |
61 |
+ { |
62 |
+ char name[STRMED]; |
63 |
+ struct port ports[STRSMALL]; |
64 |
+@@ -52,13 +52,13 @@ |
65 |
+ *hosts; |
66 |
+ |
67 |
+ // place to hold error messages |
68 |
+-char *err_msg; |
69 |
++extern char *err_msg; |
70 |
+ // place we log crap |
71 |
+-char logfile[STRLARGE]; |
72 |
++extern char logfile[STRLARGE]; |
73 |
+ // timeout (seconds) |
74 |
+-int timeout; |
75 |
++extern int timeout; |
76 |
+ // verbose mode |
77 |
+-int verbose; |
78 |
++extern int verbose; |
79 |
+ |
80 |
+ // Functions in various files |
81 |
+ |
82 |
|
83 |
diff --git a/net-analyzer/portmon/portmon-2.0-r1.ebuild b/net-analyzer/portmon/portmon-2.0-r1.ebuild |
84 |
new file mode 100644 |
85 |
index 00000000000..824a242bbd0 |
86 |
--- /dev/null |
87 |
+++ b/net-analyzer/portmon/portmon-2.0-r1.ebuild |
88 |
@@ -0,0 +1,33 @@ |
89 |
+# Copyright 1999-2020 Gentoo Authors |
90 |
+# Distributed under the terms of the GNU General Public License v2 |
91 |
+ |
92 |
+EAPI=7 |
93 |
+ |
94 |
+DESCRIPTION="Portmon is a network service monitoring daemon" |
95 |
+HOMEPAGE="http://aboleo.net/software/portmon/" |
96 |
+SRC_URI="http://aboleo.net/software/portmon/downloads/${P}.tar.gz" |
97 |
+ |
98 |
+KEYWORDS="~amd64 ~ppc ~x86" |
99 |
+SLOT="0" |
100 |
+LICENSE="GPL-2" |
101 |
+ |
102 |
+PATCHES=( |
103 |
+ "${FILESDIR}"/${P}-fno-common.patch |
104 |
+) |
105 |
+ |
106 |
+src_configure() { |
107 |
+ econf --sysconfdir=/etc/portmon |
108 |
+} |
109 |
+ |
110 |
+src_install() { |
111 |
+ into /usr |
112 |
+ dosbin src/portmon |
113 |
+ |
114 |
+ doman extras/portmon.8 |
115 |
+ |
116 |
+ insinto /etc/portmon |
117 |
+ doins extras/portmon.hosts.sample |
118 |
+ dodoc AUTHORS BUGS README |
119 |
+ |
120 |
+ newinitd "${FILESDIR}"/portmon.init portmon |
121 |
+} |