svn commit: r542858 - in head/mail/dspam: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Wed Jul 22 14:20:58 UTC 2020
Author: danfe
Date: Wed Jul 22 14:20:57 2020
New Revision: 542858
URL: https://svnweb.freebsd.org/changeset/ports/542858
Log:
Unbreak the build against MariaDB and MySQL 8.0 (the latter replaced
my_bool with C99 bool, while earlier versions used typedef to char).
PR: 243035
Added:
head/mail/dspam/files/patch-src_mysql__drv.c (contents, props changed)
Modified:
head/mail/dspam/Makefile
Modified: head/mail/dspam/Makefile
==============================================================================
--- head/mail/dspam/Makefile Wed Jul 22 14:00:59 2020 (r542857)
+++ head/mail/dspam/Makefile Wed Jul 22 14:20:57 2020 (r542858)
@@ -470,6 +470,8 @@ post-patch:
@${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^" \
${WRKSRC}/src/tools/dspam_train.in \
${WRKSRC}/src/tools/dspam_notify.in
+ @${TEST} ${MYSQL_FLAVOUR} == mariadb && ${REINPLACE_CMD} -e \
+ 's,&& defined(CR_ERROR_FIRST),,' ${WRKSRC}/configure || :
pre-configure:
.if ${PORT_OPTIONS:MVIRT_USERS} && !( ${PORT_OPTIONS:MMYSQL} || \
Added: head/mail/dspam/files/patch-src_mysql__drv.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/dspam/files/patch-src_mysql__drv.c Wed Jul 22 14:20:57 2020 (r542858)
@@ -0,0 +1,14 @@
+--- src/mysql_drv.c.orig 2012-04-11 18:48:33 UTC
++++ src/mysql_drv.c
+@@ -3461,7 +3461,11 @@ MYSQL *_mysql_drv_connect (DSPAM_CTX *CTX, const char
+ snprintf(attrib, sizeof(attrib), "%sReconnect", prefix);
+ if (_ds_match_attribute(CTX->config->attributes, attrib, "true"))
+ {
++# if MYSQL_VERSION_ID < 80000 || defined(MARIADB_VERSION_ID)
+ my_bool reconnect = 1;
++# else
++ bool reconnect = 1;
++# endif
+ mysql_options(dbh, MYSQL_OPT_RECONNECT, &reconnect);
+ }
+ #endif
More information about the svn-ports-all
mailing list