1 |
commit: 5ca09b31c5e742df6cacba9be0f77d1aef18a1c9 |
2 |
Author: Rolf Eike Beer <eike <AT> sf-mail <DOT> de> |
3 |
AuthorDate: Tue May 25 17:40:48 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 25 18:00:51 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ca09b31 |
7 |
|
8 |
net-mail/ezmlm-idx: fix build with gcc10 |
9 |
|
10 |
Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de> |
11 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
12 |
|
13 |
net-mail/ezmlm-idx/ezmlm-idx-7.0.0-r4.ebuild | 58 ++++++++++++++++++++++ |
14 |
.../files/ezmlm-idx-7.0.0-fno-common.patch | 40 +++++++++++++++ |
15 |
2 files changed, 98 insertions(+) |
16 |
|
17 |
diff --git a/net-mail/ezmlm-idx/ezmlm-idx-7.0.0-r4.ebuild b/net-mail/ezmlm-idx/ezmlm-idx-7.0.0-r4.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..0c0c7c20584 |
20 |
--- /dev/null |
21 |
+++ b/net-mail/ezmlm-idx/ezmlm-idx-7.0.0-r4.ebuild |
22 |
@@ -0,0 +1,58 @@ |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+inherit qmail toolchain-funcs |
29 |
+ |
30 |
+DESCRIPTION="Simple yet powerful mailing list manager for qmail" |
31 |
+HOMEPAGE="http://www.ezmlm.org" |
32 |
+SRC_URI="http://www.ezmlm.org/archive/${PV}/${P}.tar.gz" |
33 |
+ |
34 |
+LICENSE="GPL-2" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~alpha amd64 ~hppa ~mips ppc sparc x86" |
37 |
+IUSE="mysql postgres" |
38 |
+ |
39 |
+DEPEND="mysql? ( dev-db/mysql-connector-c:0= ) |
40 |
+ postgres? ( dev-db/postgresql )" |
41 |
+RDEPEND="${DEPEND} |
42 |
+ virtual/qmail" |
43 |
+REQUIRED_USE="?? ( mysql postgres )" |
44 |
+ |
45 |
+PATCHES=( "${FILESDIR}/${PN}-7.0.0-fno-common.patch" ) |
46 |
+ |
47 |
+src_prepare() { |
48 |
+ default |
49 |
+ echo /usr/bin > conf-bin || die |
50 |
+ echo /usr/$(get_libdir)/ezmlm > conf-lib || die |
51 |
+ echo /etc/ezmlm > conf-etc || die |
52 |
+ echo /usr/share/man > conf-man || die |
53 |
+ echo ${QMAIL_HOME} > conf-qmail || die |
54 |
+ |
55 |
+ echo $(tc-getCC) ${CFLAGS} -I/usr/include/{my,postgre}sql > conf-cc || die |
56 |
+ echo $(tc-getCC) ${CFLAGS} -Wl,-E > conf-ld || die |
57 |
+ |
58 |
+ # fix DESTDIR and skip cat man-pages |
59 |
+ sed -e "s:\(/install\) \(\"\`head\):\1 ${D}\2:" \ |
60 |
+ -e "s:\(./install.*\) < MAN$:grep -v \:/cat MAN | \1:" \ |
61 |
+ -e "s:\(\"\`head -n 1 conf-etc\`\"/default\):${D}\1:" \ |
62 |
+ -i Makefile || die |
63 |
+} |
64 |
+ |
65 |
+src_compile() { |
66 |
+ emake it man |
67 |
+ |
68 |
+ if use mysql; then |
69 |
+ emake mysql |
70 |
+ elif use postgres; then |
71 |
+ emake pgsql |
72 |
+ fi |
73 |
+} |
74 |
+ |
75 |
+src_install() { |
76 |
+ dodir /usr/bin /usr/$(get_libdir)/ezmlm /etc/ezmlm /usr/share/man |
77 |
+ dobin ezmlm-{cgi,checksub,import,rmtab} |
78 |
+ |
79 |
+ make DESTDIR="${D}" setup || die "make setup failed" |
80 |
+} |
81 |
|
82 |
diff --git a/net-mail/ezmlm-idx/files/ezmlm-idx-7.0.0-fno-common.patch b/net-mail/ezmlm-idx/files/ezmlm-idx-7.0.0-fno-common.patch |
83 |
new file mode 100644 |
84 |
index 00000000000..11e4cb5d353 |
85 |
--- /dev/null |
86 |
+++ b/net-mail/ezmlm-idx/files/ezmlm-idx-7.0.0-fno-common.patch |
87 |
@@ -0,0 +1,40 @@ |
88 |
+fix build with -fno-common |
89 |
+ |
90 |
+--- a/ezmlm-get.c 2021-05-24 12:07:05.245657000 +0200 |
91 |
++++ b/ezmlm-get.c 2021-05-24 12:07:11.477657000 +0200 |
92 |
+@@ -125,7 +125,7 @@ |
93 |
+ |
94 |
+ int act = AC_NONE; /* Action we do */ |
95 |
+ int flageditor = 0; /* if we're invoked for within dir/editor */ |
96 |
+-struct stat st; |
97 |
++static struct stat st; |
98 |
+ |
99 |
+ int flaglocked = 0; /* if directory is locked */ |
100 |
+ int flagq = 0; /* don't use 'quoted-printable' */ |
101 |
+@@ -157,7 +157,7 @@ |
102 |
+ substdio ssindex; |
103 |
+ char indexbuf[1024]; |
104 |
+ |
105 |
+-int fdlock; |
106 |
++static int fdlock; |
107 |
+ |
108 |
+ void lockup(void) |
109 |
+ /* lock unless locked */ |
110 |
+--- a/idxthread.c 2021-05-24 12:06:55.169657000 +0200 |
111 |
++++ b/idxthread.c 2021-05-24 12:07:09.197657000 +0200 |
112 |
+@@ -39,13 +39,13 @@ |
113 |
+ |
114 |
+ static char strnum[FMT_ULONG]; |
115 |
+ |
116 |
+-struct stat st; |
117 |
++static struct stat st; |
118 |
+ /* if no data, these may be the entire table, so */ |
119 |
+ /* need to be static */ |
120 |
+ static subentry sdummy; |
121 |
+ static authentry adummy; |
122 |
+ |
123 |
+-int fdlock; |
124 |
++static int fdlock; |
125 |
+ |
126 |
+ /* NOTE: These do NOT prevent double locking */ |
127 |
+ static void lockup(void) |