summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2021-05-25 19:40:48 +0200
committerSergei Trofimovich <slyfox@gentoo.org>2021-05-25 19:00:51 +0100
commit5ca09b31c5e742df6cacba9be0f77d1aef18a1c9 (patch)
tree6f394f6dc3043e206d726d1fde32895ead518055
parentdev-ruby/regexp_parser: keyworded 2.1.1-r1 for hppa, bug #790740 (diff)
downloadgentoo-5ca09b31.tar.gz
gentoo-5ca09b31.tar.bz2
gentoo-5ca09b31.zip
net-mail/ezmlm-idx: fix build with gcc10
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--net-mail/ezmlm-idx/ezmlm-idx-7.0.0-r4.ebuild58
-rw-r--r--net-mail/ezmlm-idx/files/ezmlm-idx-7.0.0-fno-common.patch40
2 files changed, 98 insertions, 0 deletions
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
new file mode 100644
index 000000000000..0c0c7c20584a
--- /dev/null
+++ b/net-mail/ezmlm-idx/ezmlm-idx-7.0.0-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit qmail toolchain-funcs
+
+DESCRIPTION="Simple yet powerful mailing list manager for qmail"
+HOMEPAGE="http://www.ezmlm.org"
+SRC_URI="http://www.ezmlm.org/archive/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~hppa ~mips ppc sparc x86"
+IUSE="mysql postgres"
+
+DEPEND="mysql? ( dev-db/mysql-connector-c:0= )
+ postgres? ( dev-db/postgresql )"
+RDEPEND="${DEPEND}
+ virtual/qmail"
+REQUIRED_USE="?? ( mysql postgres )"
+
+PATCHES=( "${FILESDIR}/${PN}-7.0.0-fno-common.patch" )
+
+src_prepare() {
+ default
+ echo /usr/bin > conf-bin || die
+ echo /usr/$(get_libdir)/ezmlm > conf-lib || die
+ echo /etc/ezmlm > conf-etc || die
+ echo /usr/share/man > conf-man || die
+ echo ${QMAIL_HOME} > conf-qmail || die
+
+ echo $(tc-getCC) ${CFLAGS} -I/usr/include/{my,postgre}sql > conf-cc || die
+ echo $(tc-getCC) ${CFLAGS} -Wl,-E > conf-ld || die
+
+ # fix DESTDIR and skip cat man-pages
+ sed -e "s:\(/install\) \(\"\`head\):\1 ${D}\2:" \
+ -e "s:\(./install.*\) < MAN$:grep -v \:/cat MAN | \1:" \
+ -e "s:\(\"\`head -n 1 conf-etc\`\"/default\):${D}\1:" \
+ -i Makefile || die
+}
+
+src_compile() {
+ emake it man
+
+ if use mysql; then
+ emake mysql
+ elif use postgres; then
+ emake pgsql
+ fi
+}
+
+src_install() {
+ dodir /usr/bin /usr/$(get_libdir)/ezmlm /etc/ezmlm /usr/share/man
+ dobin ezmlm-{cgi,checksub,import,rmtab}
+
+ make DESTDIR="${D}" setup || die "make setup failed"
+}
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
new file mode 100644
index 000000000000..11e4cb5d3533
--- /dev/null
+++ b/net-mail/ezmlm-idx/files/ezmlm-idx-7.0.0-fno-common.patch
@@ -0,0 +1,40 @@
+fix build with -fno-common
+
+--- a/ezmlm-get.c 2021-05-24 12:07:05.245657000 +0200
++++ b/ezmlm-get.c 2021-05-24 12:07:11.477657000 +0200
+@@ -125,7 +125,7 @@
+
+ int act = AC_NONE; /* Action we do */
+ int flageditor = 0; /* if we're invoked for within dir/editor */
+-struct stat st;
++static struct stat st;
+
+ int flaglocked = 0; /* if directory is locked */
+ int flagq = 0; /* don't use 'quoted-printable' */
+@@ -157,7 +157,7 @@
+ substdio ssindex;
+ char indexbuf[1024];
+
+-int fdlock;
++static int fdlock;
+
+ void lockup(void)
+ /* lock unless locked */
+--- a/idxthread.c 2021-05-24 12:06:55.169657000 +0200
++++ b/idxthread.c 2021-05-24 12:07:09.197657000 +0200
+@@ -39,13 +39,13 @@
+
+ static char strnum[FMT_ULONG];
+
+-struct stat st;
++static struct stat st;
+ /* if no data, these may be the entire table, so */
+ /* need to be static */
+ static subentry sdummy;
+ static authentry adummy;
+
+-int fdlock;
++static int fdlock;
+
+ /* NOTE: These do NOT prevent double locking */
+ static void lockup(void)