1 |
commit: a76610815a98fae3d6311884b1e3de6f409a93b2 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 28 19:38:19 2017 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 28 19:46:18 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7661081 |
7 |
|
8 |
net-dialup/mgetty: Fix building with gcc7 (#639076 by Toralf Förster) |
9 |
|
10 |
Package-Manager: Portage-2.3.14, Repoman-2.3.6 |
11 |
|
12 |
net-dialup/mgetty/Manifest | 2 +- |
13 |
net-dialup/mgetty/files/mgetty-1.1.37-gcc7.patch | 102 +++++++++++++++++++++++ |
14 |
net-dialup/mgetty/mgetty-1.1.37-r1.ebuild | 33 ++++---- |
15 |
3 files changed, 121 insertions(+), 16 deletions(-) |
16 |
|
17 |
diff --git a/net-dialup/mgetty/Manifest b/net-dialup/mgetty/Manifest |
18 |
index 6140bbf22a7..2f1f5770f19 100644 |
19 |
--- a/net-dialup/mgetty/Manifest |
20 |
+++ b/net-dialup/mgetty/Manifest |
21 |
@@ -1 +1 @@ |
22 |
-DIST mgetty1.1.37-Jun05.tar.gz 1057939 SHA256 6ff8cbc4f8aacd3dd7f247ff96715141bc6173745ea916dd98b8381a85ecdf0e SHA512 577d740c7d209b830bf8e783bf71edb666cb8bbfe8e7dceaa51dda6095d88724715394bcbd24eacfb1c377999f5779b547a7ec79cd9cdc13de6de18c4d857188 WHIRLPOOL f00d22ab213cd00f392ead46804ad1c3b192ae816b7518f1a73b4d65c180ba78fb2f193ceacf1f5aa88aeca4431eecb87e0960f0b6196a7e00247690083e937e |
23 |
+DIST mgetty1.1.37-Jun05.tar.gz 1057939 BLAKE2B de22751e72d72d19293794739c29ed115a6810cd7d57c07228526817120898ca597ba35afad36c324562c220ab67dd44655247ac46a2d6612c704557f3ec149d SHA512 577d740c7d209b830bf8e783bf71edb666cb8bbfe8e7dceaa51dda6095d88724715394bcbd24eacfb1c377999f5779b547a7ec79cd9cdc13de6de18c4d857188 |
24 |
|
25 |
diff --git a/net-dialup/mgetty/files/mgetty-1.1.37-gcc7.patch b/net-dialup/mgetty/files/mgetty-1.1.37-gcc7.patch |
26 |
new file mode 100644 |
27 |
index 00000000000..6a4fa87a90a |
28 |
--- /dev/null |
29 |
+++ b/net-dialup/mgetty/files/mgetty-1.1.37-gcc7.patch |
30 |
@@ -0,0 +1,102 @@ |
31 |
+From 09227cacda77d7785e864c0fec3854c22b3273f7 Mon Sep 17 00:00:00 2001 |
32 |
+From: Michal Sekletar <msekleta@××××××.com> |
33 |
+Date: Thu, 2 Mar 2017 09:25:45 +0100 |
34 |
+Subject: [PATCH] Fix build failure with gcc-7 |
35 |
+ |
36 |
+When function is declared inline but it is not static then compiler |
37 |
+assumes it could be potentially called from other translation |
38 |
+units. Hence it will inline the function within the translation unit and |
39 |
+at the same time it will generate object code for function with external |
40 |
+linkage. However both extern and inline variant *must* be the same and |
41 |
+therefore such function can not use any variables with static storage |
42 |
+duration. In our case functions in g3cat.c and pbm2g3.c are not called |
43 |
+from other translation units hence it is fine to mark then explicitly as |
44 |
+static and compiler won't generate other (problematic) extern variant. |
45 |
+--- |
46 |
+ g3/g3cat.c | 8 ++++---- |
47 |
+ g3/pbm2g3.c | 8 ++++---- |
48 |
+ 2 files changed, 8 insertions(+), 8 deletions(-) |
49 |
+ |
50 |
+diff --git a/g3/g3cat.c b/g3/g3cat.c |
51 |
+index 8a4b708..1951210 100644 |
52 |
+--- a/g3/g3cat.c |
53 |
++++ b/g3/g3cat.c |
54 |
+@@ -44,7 +44,7 @@ static int b_written = 0; /* bytes of a line already */ |
55 |
+ /* written */ |
56 |
+ |
57 |
+ #ifdef __GNUC__ |
58 |
+-inline |
59 |
++static inline |
60 |
+ #endif |
61 |
+ void putcode _P2( (code, len), int code, int len ) |
62 |
+ { |
63 |
+@@ -67,7 +67,7 @@ void putcode _P2( (code, len), int code, int len ) |
64 |
+ } |
65 |
+ |
66 |
+ #ifdef __GNUC__ |
67 |
+-inline |
68 |
++static inline |
69 |
+ #endif |
70 |
+ void putwhitespan _P1( (l), int l ) |
71 |
+ { |
72 |
+@@ -98,7 +98,7 @@ void putwhitespan _P1( (l), int l ) |
73 |
+ } |
74 |
+ |
75 |
+ #ifdef __GNUC__ |
76 |
+-inline |
77 |
++static inline |
78 |
+ #endif |
79 |
+ void putblackspan _P1( (l), int l ) |
80 |
+ { |
81 |
+@@ -129,7 +129,7 @@ void putblackspan _P1( (l), int l ) |
82 |
+ } |
83 |
+ |
84 |
+ #ifdef __GNUC__ |
85 |
+-inline |
86 |
++static inline |
87 |
+ #endif |
88 |
+ void puteol _P0( void ) /* write byte-aligned EOL */ |
89 |
+ { |
90 |
+diff --git a/g3/pbm2g3.c b/g3/pbm2g3.c |
91 |
+index 283a728..57cb69a 100644 |
92 |
+--- a/g3/pbm2g3.c |
93 |
++++ b/g3/pbm2g3.c |
94 |
+@@ -40,7 +40,7 @@ static unsigned int out_hibit = 0; |
95 |
+ static int out_byte_tab[ 256 ]; /* for g3 byte reversal */ |
96 |
+ |
97 |
+ #ifdef __GNUC__ |
98 |
+-inline |
99 |
++static inline |
100 |
+ #endif |
101 |
+ void putcode _P2( (code, len), int code, int len ) |
102 |
+ { |
103 |
+@@ -60,7 +60,7 @@ void putcode _P2( (code, len), int code, int len ) |
104 |
+ } |
105 |
+ |
106 |
+ #ifdef __GNUC__ |
107 |
+-inline |
108 |
++static inline |
109 |
+ #endif |
110 |
+ void puteol _P0( void ) /* write byte-aligned EOL */ |
111 |
+ { |
112 |
+@@ -69,7 +69,7 @@ void puteol _P0( void ) /* write byte-aligned EOL */ |
113 |
+ } |
114 |
+ |
115 |
+ #ifdef __GNUC__ |
116 |
+-inline |
117 |
++static inline |
118 |
+ #endif |
119 |
+ void putwhitespan _P1( (l), int l ) |
120 |
+ { |
121 |
+@@ -100,7 +100,7 @@ void putwhitespan _P1( (l), int l ) |
122 |
+ } |
123 |
+ |
124 |
+ #ifdef __GNUC__ |
125 |
+-inline |
126 |
++static inline |
127 |
+ #endif |
128 |
+ void putblackspan _P1( (l), int l ) |
129 |
+ { |
130 |
+-- |
131 |
+2.9.3 |
132 |
+ |
133 |
|
134 |
diff --git a/net-dialup/mgetty/mgetty-1.1.37-r1.ebuild b/net-dialup/mgetty/mgetty-1.1.37-r1.ebuild |
135 |
index f071ac4d388..a6305c0271c 100644 |
136 |
--- a/net-dialup/mgetty/mgetty-1.1.37-r1.ebuild |
137 |
+++ b/net-dialup/mgetty/mgetty-1.1.37-r1.ebuild |
138 |
@@ -1,14 +1,15 @@ |
139 |
-# Copyright 1999-2015 Gentoo Foundation |
140 |
+# Copyright 1999-2017 Gentoo Foundation |
141 |
# Distributed under the terms of the GNU General Public License v2 |
142 |
|
143 |
-EAPI=5 |
144 |
-inherit eutils flag-o-matic toolchain-funcs user |
145 |
+EAPI=6 |
146 |
+inherit flag-o-matic toolchain-funcs user |
147 |
|
148 |
DESCRIPTION="fax and voice modem programs" |
149 |
SRC_URI="ftp://mgetty.greenie.net/pub/mgetty/source/1.1/${PN}${PV}-Jun05.tar.gz" |
150 |
HOMEPAGE="http://mgetty.greenie.net/" |
151 |
|
152 |
-DEPEND="doc? ( virtual/latex-base virtual/texi2dvi ) |
153 |
+DEPEND=" |
154 |
+ doc? ( virtual/latex-base virtual/texi2dvi ) |
155 |
>=sys-apps/sed-4 |
156 |
sys-apps/groff |
157 |
dev-lang/perl |
158 |
@@ -17,9 +18,11 @@ DEPEND="doc? ( virtual/latex-base virtual/texi2dvi ) |
159 |
fax? ( |
160 |
!net-misc/efax |
161 |
!net-misc/hylafax |
162 |
- )" |
163 |
+ ) |
164 |
+" |
165 |
RDEPEND="${DEPEND} |
166 |
- fax? ( media-libs/netpbm app-text/ghostscript-gpl )" |
167 |
+ fax? ( media-libs/netpbm app-text/ghostscript-gpl ) |
168 |
+" |
169 |
|
170 |
SLOT="0" |
171 |
LICENSE="GPL-2" |
172 |
@@ -32,12 +35,13 @@ pkg_setup() { |
173 |
} |
174 |
|
175 |
src_prepare() { |
176 |
- epatch "${FILESDIR}/${P}-gentoo.patch" |
177 |
- epatch "${FILESDIR}/${P}-qa-fixes.patch" |
178 |
- epatch "${FILESDIR}/${PN}-1.1.36-callback.patch" # add callback install to Makefile |
179 |
- epatch "${FILESDIR}/Lucent.c.patch" # Lucent modem CallerID patch - bug #80366 |
180 |
- use fax || epatch "${FILESDIR}/${P}-nofax.patch" # don't install fax related files - bug #195467 |
181 |
- epatch "${FILESDIR}/${PN}-1.1.36-tmpfile.patch" # fix security bug 235806 |
182 |
+ eapply "${FILESDIR}/${P}-gentoo.patch" |
183 |
+ eapply "${FILESDIR}/${P}-qa-fixes.patch" |
184 |
+ eapply "${FILESDIR}/${PN}-1.1.36-callback.patch" # add callback install to Makefile |
185 |
+ eapply "${FILESDIR}/Lucent.c.patch" # Lucent modem CallerID patch - bug #80366 |
186 |
+ use fax || eapply "${FILESDIR}/${P}-nofax.patch" # don't install fax related files - bug #195467 |
187 |
+ eapply "${FILESDIR}/${PN}-1.1.36-tmpfile.patch" # fix security bug 235806 |
188 |
+ eapply "${FILESDIR}/${P}-gcc7.patch" |
189 |
|
190 |
sed -e 's:var/log/mgetty:var/log/mgetty/mgetty:' \ |
191 |
-e 's:var/log/sendfax:var/log/mgetty/sendfax:' \ |
192 |
@@ -60,6 +64,8 @@ src_prepare() { |
193 |
# Support user's CFLAGS and LDFLAGS. |
194 |
sed -e "s/\$(CFLAGS) -o newslock/${CFLAGS} ${LDFLAGS} -Wall -o newslock/" \ |
195 |
-e "s/\$(LDLAGS)/${LDFLAGS}/" -i {,fax/}Makefile || die |
196 |
+ |
197 |
+ default |
198 |
} |
199 |
|
200 |
src_compile() { |
201 |
@@ -157,7 +163,4 @@ pkg_postinst() { |
202 |
elog |
203 |
elog "If you want to grab voice messages from a remote location, you must save" |
204 |
elog "the password in /var/spool/voice/.code file" |
205 |
- echo |
206 |
- ewarn "/var/spool/voice/.code and /var/spool/voice/messages/Index" |
207 |
- ewarn "are not longer created by this automatically!" |
208 |
} |