1 |
commit: 14a8fb0b70c1bee6698e5d0e5c1eedf1e8dcaa0e |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 20 11:04:59 2018 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 20 11:10:55 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14a8fb0b |
7 |
|
8 |
net-dialup/mgetty: Version 1.2.1. |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
11 |
|
12 |
net-dialup/mgetty/Manifest | 1 + |
13 |
.../mgetty/files/mgetty-1.2.1-Lucent.c.patch | 16 ++ |
14 |
net-dialup/mgetty/files/mgetty-1.2.1-gentoo.patch | 154 +++++++++++++++++ |
15 |
net-dialup/mgetty/mgetty-1.2.1.ebuild | 185 +++++++++++++++++++++ |
16 |
4 files changed, 356 insertions(+) |
17 |
|
18 |
diff --git a/net-dialup/mgetty/Manifest b/net-dialup/mgetty/Manifest |
19 |
index 2f1f5770f19..87519dc4c6b 100644 |
20 |
--- a/net-dialup/mgetty/Manifest |
21 |
+++ b/net-dialup/mgetty/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
+DIST mgetty-1.2.1.tar.gz 1077415 BLAKE2B 09d48c6cb7917a3dbbfc97c1d32ce43b9a3e64e8a44c8a3a7bfdd168421c287357a9d43504fb4d1b354ffb0f8e2a9c52b56ac3464f196f56064d96a7651e0d6e SHA512 2a82dfb782044d9daf8d41158fa10e991dbd7bd37ab43ea44422166554dd790e989ac49e4ff471d168d1cbb49edc5bedb8762ab61884e4653650686d1bbc2a9b |
24 |
DIST mgetty1.1.37-Jun05.tar.gz 1057939 BLAKE2B de22751e72d72d19293794739c29ed115a6810cd7d57c07228526817120898ca597ba35afad36c324562c220ab67dd44655247ac46a2d6612c704557f3ec149d SHA512 577d740c7d209b830bf8e783bf71edb666cb8bbfe8e7dceaa51dda6095d88724715394bcbd24eacfb1c377999f5779b547a7ec79cd9cdc13de6de18c4d857188 |
25 |
|
26 |
diff --git a/net-dialup/mgetty/files/mgetty-1.2.1-Lucent.c.patch b/net-dialup/mgetty/files/mgetty-1.2.1-Lucent.c.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..ac73bea808c |
29 |
--- /dev/null |
30 |
+++ b/net-dialup/mgetty/files/mgetty-1.2.1-Lucent.c.patch |
31 |
@@ -0,0 +1,16 @@ |
32 |
+--- a/voice/libvoice/Lucent.c |
33 |
++++ b/voice/libvoice/Lucent.c |
34 |
+@@ -96,6 +96,13 @@ |
35 |
+ if (voice_command("AT+VLS=0", "OK") != VMA_USER_1) |
36 |
+ lprintf(L_WARN, "can't deselect all input/output devices"); |
37 |
+ |
38 |
++ /* the Lucent chips DO support Caller ID, this command is OK */ |
39 |
++ /* Just borrowed from the V253modem.c file */ |
40 |
++ /* enable callerid (if supported) and setformat */ |
41 |
++ if (voice_command("AT+VCID=1", "OK") != VMA_USER_1) |
42 |
++ lprintf(L_WARN, "can't set caller ID output"); |
43 |
++ /* mgetty supports formated callerid output */ |
44 |
++ |
45 |
+ voice_modem_state = IDLE; |
46 |
+ return(OK); |
47 |
+ } |
48 |
|
49 |
diff --git a/net-dialup/mgetty/files/mgetty-1.2.1-gentoo.patch b/net-dialup/mgetty/files/mgetty-1.2.1-gentoo.patch |
50 |
new file mode 100644 |
51 |
index 00000000000..fd46ff23ed4 |
52 |
--- /dev/null |
53 |
+++ b/net-dialup/mgetty/files/mgetty-1.2.1-gentoo.patch |
54 |
@@ -0,0 +1,154 @@ |
55 |
+--- a/callback/Makefile |
56 |
++++ b/callback/Makefile |
57 |
+@@ -37,7 +37,7 @@ |
58 |
+ # install programs |
59 |
+ # |
60 |
+ install: all |
61 |
+- $(INSTALL) -s -m 700 -o root callback $(SBINDIR) |
62 |
+- $(INSTALL) -s -m 4711 -o root ct $(BINDIR) |
63 |
++ $(INSTALL) -m 700 -o root callback $(SBINDIR) |
64 |
++ $(INSTALL) -m 4711 -o root ct $(BINDIR) |
65 |
+ |
66 |
+ # source modules |
67 |
+--- a/doc/mgetty.texi-in |
68 |
++++ b/doc/mgetty.texi-in |
69 |
+@@ -19,6 +19,11 @@ |
70 |
+ Copyright @copyright{} 1993-2005 Gert Doering |
71 |
+ @end ifinfo |
72 |
+ |
73 |
++@dircategory User |
74 |
++@direntry |
75 |
++* MGETTY: (mgetty). Modem+Voice+Fax utilities |
76 |
++@end direntry |
77 |
++ |
78 |
+ @titlepage |
79 |
+ @sp 6 |
80 |
+ @center @titlefont{mgetty+sendfax} |
81 |
+--- a/fax/faxspool.in |
82 |
++++ b/fax/faxspool.in |
83 |
+@@ -390,7 +390,7 @@ |
84 |
+ |
85 |
+ # |
86 |
+ # convert pdf data |
87 |
+-# needs GNU GhostScript and Adobe acroread installed. |
88 |
++# needs GNU GhostScript installed. |
89 |
+ # For driver selection, see definition of GS_DRIVER_{HI,LO} above. |
90 |
+ # |
91 |
+ # contributed by mfvm@×××.de (Michael Fischer v. Mollard) |
92 |
+@@ -401,7 +401,7 @@ |
93 |
+ test X$3 = X-n && driver="$GS_DRIVER_LO" |
94 |
+ |
95 |
+ cat $1 | |
96 |
+- acroread -toPostScript | |
97 |
++ pdf2ps -sOutputFile=- - | |
98 |
+ gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER - |
99 |
+ } |
100 |
+ |
101 |
+--- a/frontends/X11/viewfax/Makefile |
102 |
++++ b/frontends/X11/viewfax/Makefile |
103 |
+@@ -61,7 +61,7 @@ |
104 |
+ g3hack: g3hack.c |
105 |
+ |
106 |
+ install: viewfax |
107 |
+- $(INSTALL) -s -m 755 viewfax $(BINDIR) |
108 |
++ $(INSTALL) -m 755 viewfax $(BINDIR) |
109 |
+ $(INSTALL) -m 644 viewfax.man $(MANDIR)/viewfax.1 |
110 |
+ $(INSTALL) -m 644 viewfax.tif $(LIBDIR) |
111 |
+ |
112 |
+--- a/g3/Makefile |
113 |
++++ b/g3/Makefile |
114 |
+@@ -37,13 +37,13 @@ |
115 |
+ # install programs |
116 |
+ # |
117 |
+ for f in $(G3_PROGRAMS) ; do \ |
118 |
+- $(INSTALL) -s -m 755 $$f $(BINDIR) ; \ |
119 |
++ $(INSTALL) -m 755 $$f $(BINDIR) ; \ |
120 |
+ done |
121 |
+ # |
122 |
+ # make symlink for "g3topbm" (so third-party fax viewers won't fail) |
123 |
+-# |
124 |
+- -cd $(BINDIR) ; \ |
125 |
+- test -x g3topbm || ln -s g32pbm g3topbm |
126 |
++# Note for Gentoo: following lines will create collision with netpbm if netpbm is installed after |
127 |
++# -cd $(BINDIR) ; \ |
128 |
++# test -x g3topbm || ln -s g32pbm g3topbm |
129 |
+ |
130 |
+ |
131 |
+ # test suite |
132 |
+--- a/Makefile |
133 |
++++ b/Makefile |
134 |
+@@ -596,12 +596,8 @@ |
135 |
+ $(INSTALL) -m 755 newslock $(BINDIR) |
136 |
+ |
137 |
+ -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) ) |
138 |
+- if [ -f $(SBINDIR)/mgetty ] ; then \ |
139 |
+- mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old ; fi |
140 |
+- if [ -f $(SBINDIR)/sendfax ] ; then \ |
141 |
+- mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old ; fi |
142 |
+- $(INSTALL) -s -m 700 mgetty $(SBINDIR) |
143 |
+- $(INSTALL) -s -m 755 sendfax $(SBINDIR) |
144 |
++ $(INSTALL) -m 700 mgetty $(SBINDIR) |
145 |
++ $(INSTALL) -m 755 sendfax $(SBINDIR) |
146 |
+ # |
147 |
+ # data files + directories |
148 |
+ # |
149 |
+@@ -663,7 +661,7 @@ |
150 |
+ if [ ! -z "$(INSTALL_MECHO)" ] ; then \ |
151 |
+ cd compat ; \ |
152 |
+ $(CC) $(CFLAGS) -o mg.echo mg.echo.c && \ |
153 |
+- $(INSTALL) -s -m 755 mg.echo $(BINDIR) ; \ |
154 |
++ $(INSTALL) -m 755 mg.echo $(BINDIR) ; \ |
155 |
+ fi |
156 |
+ |
157 |
+ # |
158 |
+--- a/mgetty.cfg.in |
159 |
++++ b/mgetty.cfg.in |
160 |
+@@ -20,16 +20,16 @@ |
161 |
+ # access the modem(s) with @SPEED@ bps |
162 |
+ speed @SPEED@ |
163 |
+ |
164 |
+-# use these options to make the /dev/tty-device owned by "uucp.uucp" |
165 |
++# use these options to make the /dev/tty-device owned by "fax.fax" |
166 |
+ # and mode "rw-rw-r--" (0664). *LEADING ZERO NEEDED!* |
167 |
+-#port-owner uucp |
168 |
+-#port-group uucp |
169 |
++#port-owner fax |
170 |
++#port-group fax |
171 |
+ #port-mode 0664 |
172 |
+ |
173 |
+-# use these options to make incoming faxes owned by "root.uucp" |
174 |
++# use these options to make incoming faxes owned by "root.fax" |
175 |
+ # and mode "rw-r-----" (0640). *LEADING ZERO NEEDED!* |
176 |
+ #fax-owner root |
177 |
+-#fax-group uucp |
178 |
++#fax-group fax |
179 |
+ #fax-mode 0640 |
180 |
+ |
181 |
+ |
182 |
+--- a/voice/Makefile |
183 |
++++ b/voice/Makefile |
184 |
+@@ -85,6 +85,7 @@ |
185 |
+ @echo "" |
186 |
+ $(INSTALL) -m 700 vgetty/vgetty $(SBINDIR) |
187 |
+ $(INSTALL) -m 755 vm/vm $(BINDIR) |
188 |
++ $(INSTALL) -m 644 voice.conf-dist $(CONFDIR)/voice.conf |
189 |
+ for i in $(PVFTOOLS); \ |
190 |
+ do \ |
191 |
+ $(INSTALL) -m 755 pvftools/$$i $(BINDIR); \ |
192 |
+--- a/voice/voice.conf-dist |
193 |
++++ b/voice/voice.conf-dist |
194 |
+@@ -47,11 +47,11 @@ |
195 |
+ voice_dir /var/spool/voice |
196 |
+ |
197 |
+ # |
198 |
+-# incoming messages are owned by "root.phone" and mode "rw-rw----" (0660) |
199 |
++# incoming messages are owned by "fax:fax" and mode "rw-rw----" (0660) |
200 |
+ # |
201 |
+ |
202 |
+-phone_owner root |
203 |
+-phone_group phone |
204 |
++phone_owner fax |
205 |
++phone_group fax |
206 |
+ phone_mode 0660 |
207 |
+ |
208 |
+ # |
209 |
|
210 |
diff --git a/net-dialup/mgetty/mgetty-1.2.1.ebuild b/net-dialup/mgetty/mgetty-1.2.1.ebuild |
211 |
new file mode 100644 |
212 |
index 00000000000..a62a5460aee |
213 |
--- /dev/null |
214 |
+++ b/net-dialup/mgetty/mgetty-1.2.1.ebuild |
215 |
@@ -0,0 +1,185 @@ |
216 |
+# Copyright 1999-2018 Gentoo Foundation |
217 |
+# Distributed under the terms of the GNU General Public License v2 |
218 |
+ |
219 |
+EAPI=6 |
220 |
+inherit flag-o-matic toolchain-funcs user |
221 |
+ |
222 |
+DESCRIPTION="fax and voice modem programs" |
223 |
+HOMEPAGE="http://mgetty.greenie.net/" |
224 |
+SRC_URI="ftp://mgetty.greenie.net/pub/mgetty/source/1.2/${P}.tar.gz" |
225 |
+ |
226 |
+DEPEND=" |
227 |
+ doc? ( virtual/latex-base virtual/texi2dvi ) |
228 |
+ >=sys-apps/sed-4 |
229 |
+ sys-apps/groff |
230 |
+ dev-lang/perl |
231 |
+ sys-apps/texinfo |
232 |
+ virtual/awk |
233 |
+ fax? ( |
234 |
+ !net-misc/efax |
235 |
+ !net-misc/hylafax |
236 |
+ ) |
237 |
+" |
238 |
+RDEPEND="${DEPEND} |
239 |
+ fax? ( media-libs/netpbm app-text/ghostscript-gpl ) |
240 |
+" |
241 |
+ |
242 |
+SLOT="0" |
243 |
+LICENSE="GPL-2" |
244 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
245 |
+IUSE="doc +fax fidonet" |
246 |
+ |
247 |
+pkg_setup() { |
248 |
+ enewgroup fax |
249 |
+ enewuser fax -1 -1 /dev/null fax |
250 |
+} |
251 |
+ |
252 |
+PATCHES=( |
253 |
+ "${FILESDIR}"/${PN}-1.1.36-callback.patch |
254 |
+ "${FILESDIR}"/${PN}-1.1.36-tmpfile.patch |
255 |
+ "${FILESDIR}"/${PN}-1.1.37-qa-fixes.patch |
256 |
+ "${FILESDIR}"/${PN}-1.2.1-Lucent.c.patch |
257 |
+ "${FILESDIR}"/${PN}-1.2.1-gentoo.patch |
258 |
+) |
259 |
+ |
260 |
+src_prepare() { |
261 |
+ default |
262 |
+ |
263 |
+ chmod +x mkidirs |
264 |
+ |
265 |
+ # don't install fax related files - bug #195467 |
266 |
+ use fax || eapply "${FILESDIR}/${PN}-1.1.37-nofax.patch" |
267 |
+ |
268 |
+ sed -i -e 's:/usr/local/lib/mgetty+sendfax:/etc/mgetty+sendfax:' faxrunq.config || die 'changing mgetty config dir failed' |
269 |
+ sed -i -e 's:/usr/local/bin/g3cat:/usr/bin/g3cat:' faxrunq.config fax/faxspool.rules || die 'changing g3cat path failed' |
270 |
+ |
271 |
+ sed -e "/^doc-all:/s/mgetty.asc mgetty.info mgetty.dvi mgetty.ps/mgetty.info/" \ |
272 |
+ -i doc/Makefile || die 'first sed on doc/Makefile failed' |
273 |
+ if use doc; then |
274 |
+ sed -i \ |
275 |
+ -e "s/^doc-all:/doc-all: mgetty.ps/" \ |
276 |
+ -e "s/^all:/all: doc-all/" \ |
277 |
+ doc/Makefile || die 'second sed on doc/Makefile failed' |
278 |
+ fi |
279 |
+ |
280 |
+ sed -i \ |
281 |
+ -e 's:^CC=:CC?=:g' \ |
282 |
+ -e 's:^CFLAGS=:CFLAGS?=:g' \ |
283 |
+ {,*/}Makefile || die |
284 |
+ sed -i \ |
285 |
+ -e 's:^AR=:AR?=:g' \ |
286 |
+ -e 's:^CFLAGS=:CFLAGS+= -I..:g' \ |
287 |
+ -e 's:^RANLIB=:RANLIB?=:g' \ |
288 |
+ */Makefile || die |
289 |
+} |
290 |
+ |
291 |
+src_configure() { |
292 |
+ tc-export AR CC RANLIB |
293 |
+ |
294 |
+ sed -e 's:var/log/mgetty:var/log/mgetty/mgetty:' \ |
295 |
+ -e 's:var/log/sendfax:var/log/mgetty/sendfax:' \ |
296 |
+ -e 's:\/\* \(\#define CNDFILE "dialin.config"\) \*\/:\1:' \ |
297 |
+ -e 's:\(\#define FAX_NOTIFY_PROGRAM\).*:\1 "/etc/mgetty+sendfax/new_fax":' \ |
298 |
+ policy.h-dist > policy.h || die 'creating policy.h failed' |
299 |
+ |
300 |
+ sed -i \ |
301 |
+ -e "s/\$(CFLAGS) -o newslock/${CFLAGS} ${LDFLAGS} -Wall -o newslock/" \ |
302 |
+ -e "s/\$(LDLAGS)/${LDFLAGS}/" \ |
303 |
+ {,fax/}Makefile || die |
304 |
+} |
305 |
+ |
306 |
+src_compile() { |
307 |
+ use fidonet && append-cppflags "-DFIDO" |
308 |
+ append-cppflags "-DAUTO_PPP" |
309 |
+ # bug #299421 |
310 |
+ VARTEXFONTS="${T}"/fonts emake -j1 prefix=/usr \ |
311 |
+ CONFDIR=/etc/mgetty+sendfax \ |
312 |
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \ |
313 |
+ LDFLAGS="${LDFLAGS}" \ |
314 |
+ all vgetty |
315 |
+} |
316 |
+ |
317 |
+src_install () { |
318 |
+ # parallelization issue: vgetty-install target fails if install target |
319 |
+ # isn't finished |
320 |
+ local targets |
321 |
+ for targets in install "vgetty-install install-callback"; do |
322 |
+ emake prefix="${D}/usr" \ |
323 |
+ INFODIR="${D}/usr/share/info" \ |
324 |
+ CONFDIR="${D}/etc/mgetty+sendfax" \ |
325 |
+ MAN1DIR="${D}/usr/share/man/man1" \ |
326 |
+ MAN4DIR="${D}/usr/share/man/man4" \ |
327 |
+ MAN5DIR="${D}/usr/share/man/man5" \ |
328 |
+ MAN8DIR="${D}/usr/share/man/man8" \ |
329 |
+ SBINDIR="${D}/usr/sbin" \ |
330 |
+ BINDIR="${D}/usr/bin" \ |
331 |
+ VOICE_DIR="${D}/var/spool/voice" \ |
332 |
+ PHONE_GROUP=fax \ |
333 |
+ PHONE_PERMS=755 \ |
334 |
+ spool="${D}/var/spool" \ |
335 |
+ ${targets} |
336 |
+ done |
337 |
+ |
338 |
+ keepdir /var/log/mgetty |
339 |
+ |
340 |
+ #Install mgetty into /sbin (#119078) |
341 |
+ dodir /sbin && \ |
342 |
+ mv "${D}"/usr/sbin/mgetty "${D}"/sbin && \ |
343 |
+ dosym /sbin/mgetty /usr/sbin/mgetty || die "failed to install /sbin/mgetty" |
344 |
+ #Don't install ct (#106337) |
345 |
+ rm "${D}"/usr/bin/ct || die "failed to remove useless ct program" |
346 |
+ |
347 |
+ dodoc BUGS ChangeLog README.1st Recommend THANKS TODO \ |
348 |
+ doc/*.txt doc/modems.db |
349 |
+ doinfo doc/mgetty.info |
350 |
+ |
351 |
+ docinto vgetty |
352 |
+ dodoc voice/{Readme,Announce,ChangeLog,Credits} |
353 |
+ |
354 |
+ if use doc; then |
355 |
+ dodoc doc/mgetty.ps |
356 |
+ fi |
357 |
+ |
358 |
+ docinto vgetty/doc |
359 |
+ dodoc voice/doc/* |
360 |
+ |
361 |
+ if use fax; then |
362 |
+ mv samples/new_fax.all samples_new_fax.all || die "move failed." |
363 |
+ docinto samples |
364 |
+ dodoc samples/* |
365 |
+ |
366 |
+ docinto samples/new_fax |
367 |
+ dodoc samples_new_fax.all/* |
368 |
+ fi |
369 |
+ |
370 |
+ if ! use fax; then |
371 |
+ insinto /usr/share/${PN}/frontends |
372 |
+ doins -r frontends/{voice,network} |
373 |
+ else |
374 |
+ insinto /usr/share/${PN} |
375 |
+ doins -r frontends |
376 |
+ fi |
377 |
+ insinto /usr/share/${PN} |
378 |
+ doins -r patches |
379 |
+ insinto /usr/share/${PN}/voice |
380 |
+ doins -r voice/{contrib,Perl,scripts} |
381 |
+ |
382 |
+ diropts -m 0750 -o fax -g fax |
383 |
+ dodir /var/spool/voice |
384 |
+ keepdir /var/spool/voice/incoming |
385 |
+ keepdir /var/spool/voice/messages |
386 |
+ if use fax; then |
387 |
+ dodir /var/spool/fax |
388 |
+ dodir /var/spool/fax/outgoing |
389 |
+ keepdir /var/spool/fax/outgoing/locks |
390 |
+ keepdir /var/spool/fax/incoming |
391 |
+ fi |
392 |
+} |
393 |
+ |
394 |
+pkg_postinst() { |
395 |
+ elog "Users who wish to use the fax or voicemail capabilities must be members" |
396 |
+ elog "of the group fax in order to access files" |
397 |
+ elog |
398 |
+ elog "If you want to grab voice messages from a remote location, you must save" |
399 |
+ elog "the password in /var/spool/voice/.code file" |
400 |
+} |