1 |
commit: 8132bd88e43fd6d55783885c570e129b98ee80e1 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 18 21:11:17 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 18 21:54:36 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8132bd88 |
7 |
|
8 |
net-misc/portfwd: EAPI 8, fix configure w/ clang 16 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/725162 |
11 |
Closes: https://bugs.gentoo.org/809326 |
12 |
Closes: https://bugs.gentoo.org/898092 |
13 |
Closes: https://bugs.gentoo.org/900308 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
.../portfwd/files/portfwd-0.29-build-system.patch | 76 ++++++++++++++++++++++ |
17 |
net-misc/portfwd/portfwd-0.29-r1.ebuild | 45 ------------- |
18 |
net-misc/portfwd/portfwd-0.29-r2.ebuild | 33 ++++++++++ |
19 |
3 files changed, 109 insertions(+), 45 deletions(-) |
20 |
|
21 |
diff --git a/net-misc/portfwd/files/portfwd-0.29-build-system.patch b/net-misc/portfwd/files/portfwd-0.29-build-system.patch |
22 |
new file mode 100644 |
23 |
index 000000000000..fb9649b65cd9 |
24 |
--- /dev/null |
25 |
+++ b/net-misc/portfwd/files/portfwd-0.29-build-system.patch |
26 |
@@ -0,0 +1,76 @@ |
27 |
+--- a/Makefile.am |
28 |
++++ b/Makefile.am |
29 |
+@@ -1,4 +1,3 @@ |
30 |
+ SUBDIRS = getopt src tools doc |
31 |
+ |
32 |
+-docdir = $(prefix)/doc/portfwd |
33 |
+ doc_DATA = COPYING README CREDITS TODO |
34 |
+--- a/configure.in |
35 |
++++ b/configure.in |
36 |
+@@ -8,6 +8,7 @@ dnl Checks for programs. |
37 |
+ AC_PROG_CC |
38 |
+ AC_PROG_CXX |
39 |
+ AC_PROG_YACC |
40 |
++AM_PROG_AR |
41 |
+ AM_PROG_LEX |
42 |
+ AC_PROG_RANLIB |
43 |
+ |
44 |
+@@ -45,6 +46,7 @@ dnl ) |
45 |
+ dnl Checks for MSG_PROXY symbol |
46 |
+ AC_TRY_RUN( |
47 |
+ [ |
48 |
++#include <stdlib.h> |
49 |
+ #include <sys/socket.h> |
50 |
+ int main() |
51 |
+ { |
52 |
+--- a/doc/Makefile.am |
53 |
++++ b/doc/Makefile.am |
54 |
+@@ -3,5 +3,4 @@ |
55 |
+ man_MANS = portfwd.8 portfwd.cfg.5 |
56 |
+ noinst_DATA = INSTALL.configure |
57 |
+ |
58 |
+-docdir = $(prefix)/doc/portfwd |
59 |
+ doc_DATA = FAQ conf.txt |
60 |
+--- a/getopt/Makefile.am |
61 |
++++ b/getopt/Makefile.am |
62 |
+@@ -3,9 +3,9 @@ noinst_LIBRARIES = libgetopt.a |
63 |
+ libgetopt_a_SOURCES = getopt.c getopt1.c |
64 |
+ |
65 |
+ getopt.o: getopt.c |
66 |
+- $(CC) -o $@ -c $< |
67 |
++ $(CC) @CFLAGS@ -o $@ -c $< |
68 |
+ cp $@ ../src |
69 |
+ getopt1.o: getopt1.c |
70 |
+- $(CC) -o $@ -c $< |
71 |
++ $(CC) @CFLAGS@ -o $@ -c $< |
72 |
+ cp $@ ../src |
73 |
+ |
74 |
+--- a/getopt/getopt.c |
75 |
++++ b/getopt/getopt.c |
76 |
+@@ -91,6 +91,8 @@ |
77 |
+ # endif |
78 |
+ #endif |
79 |
+ |
80 |
++#include <string.h> |
81 |
++ |
82 |
+ /* This version of `getopt' appears to the caller like standard Unix `getopt' |
83 |
+ but it behaves differently for the user, since it allows the user |
84 |
+ to intersperse the options with the other arguments. |
85 |
+--- a/src/Makefile.am |
86 |
++++ b/src/Makefile.am |
87 |
+@@ -1,5 +1,5 @@ |
88 |
+-CFLAGS = -Wall -ggdb -O3 -DPORTFWD_CONF=\"$(sysconfdir)/portfwd.cfg\" |
89 |
+-CXXFLAGS = $(CFLAGS) |
90 |
++CFLAGS = @CFLAGS@ -Wall -DPORTFWD_CONF=\"$(sysconfdir)/portfwd.cfg\" |
91 |
++CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\"$(sysconfdir)/portfwd.cfg\" |
92 |
+ INCLUDES = -I$(top_srcdir)/src |
93 |
+ |
94 |
+ sbin_PROGRAMS = portfwd |
95 |
+--- a/tools/Makefile.am |
96 |
++++ b/tools/Makefile.am |
97 |
+@@ -1,4 +1,4 @@ |
98 |
+-CXXFLAGS = -Wall -g -O3 |
99 |
++CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\"$(sysconfdir)/portfwd.cfg\" |
100 |
+ INCLUDES = -I$(top_srcdir)/src |
101 |
+ |
102 |
+ noinst_PROGRAMS = t_vector udp_rcv udp_snd |
103 |
|
104 |
diff --git a/net-misc/portfwd/portfwd-0.29-r1.ebuild b/net-misc/portfwd/portfwd-0.29-r1.ebuild |
105 |
deleted file mode 100644 |
106 |
index c64a3293d245..000000000000 |
107 |
--- a/net-misc/portfwd/portfwd-0.29-r1.ebuild |
108 |
+++ /dev/null |
109 |
@@ -1,45 +0,0 @@ |
110 |
-# Copyright 1999-2021 Gentoo Authors |
111 |
-# Distributed under the terms of the GNU General Public License v2 |
112 |
- |
113 |
-EAPI=6 |
114 |
-inherit autotools systemd |
115 |
- |
116 |
-DESCRIPTION="Port Forwarding Daemon" |
117 |
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
118 |
-HOMEPAGE="http://portfwd.sourceforge.net" |
119 |
-LICENSE="GPL-2" |
120 |
- |
121 |
-SLOT="0" |
122 |
-KEYWORDS="amd64 ~ia64 ~ppc ~sparc x86" |
123 |
- |
124 |
-src_prepare() { |
125 |
- default |
126 |
- |
127 |
- cd src |
128 |
- sed -iorig \ |
129 |
- -e "s:^CFLAGS =.*:CFLAGS = @CFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \ |
130 |
- -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \ |
131 |
- Makefile.am || die |
132 |
- cd ../tools |
133 |
- sed -iorig \ |
134 |
- -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \ |
135 |
- Makefile.am || die |
136 |
- cd ../getopt |
137 |
- sed -iorig -e "s:$.CC.:\$(CC) @CFLAGS@:g" Makefile.am || die |
138 |
- cd ../doc |
139 |
- sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am || die |
140 |
- cd .. |
141 |
- sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am || die |
142 |
- |
143 |
- eautoreconf |
144 |
-} |
145 |
- |
146 |
-src_install() { |
147 |
- default |
148 |
- |
149 |
- dodoc cfg/* |
150 |
- |
151 |
- newinitd "${FILESDIR}"/${PN}.init ${PN} |
152 |
- newconfd "${FILESDIR}"/${PN}.confd ${PN} |
153 |
- systemd_dounit "${FILESDIR}"/${PN}.service |
154 |
-} |
155 |
|
156 |
diff --git a/net-misc/portfwd/portfwd-0.29-r2.ebuild b/net-misc/portfwd/portfwd-0.29-r2.ebuild |
157 |
new file mode 100644 |
158 |
index 000000000000..98f201afdb05 |
159 |
--- /dev/null |
160 |
+++ b/net-misc/portfwd/portfwd-0.29-r2.ebuild |
161 |
@@ -0,0 +1,33 @@ |
162 |
+# Copyright 1999-2023 Gentoo Authors |
163 |
+# Distributed under the terms of the GNU General Public License v2 |
164 |
+ |
165 |
+EAPI=8 |
166 |
+ |
167 |
+inherit autotools systemd |
168 |
+ |
169 |
+DESCRIPTION="Port Forwarding Daemon" |
170 |
+HOMEPAGE="http://portfwd.sourceforge.net" |
171 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
172 |
+ |
173 |
+LICENSE="GPL-2" |
174 |
+SLOT="0" |
175 |
+KEYWORDS="amd64 ~ia64 ~ppc ~sparc x86" |
176 |
+ |
177 |
+PATCHES=( |
178 |
+ "${FILESDIR}"/${PN}-0.29-build-system.patch |
179 |
+) |
180 |
+ |
181 |
+src_prepare() { |
182 |
+ default |
183 |
+ eautoreconf |
184 |
+} |
185 |
+ |
186 |
+src_install() { |
187 |
+ default |
188 |
+ |
189 |
+ dodoc cfg/* |
190 |
+ |
191 |
+ newinitd "${FILESDIR}"/${PN}.init ${PN} |
192 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
193 |
+ systemd_dounit "${FILESDIR}"/${PN}.service |
194 |
+} |