Bug 243035

Summary: mail/dspam: Fails to configure with MariaDB 10.x: error: Unsupported version of MySQL (Missing CR_ERROR_FIRST)
Product: Ports & Packages Reporter: Vikash Badal <vikashb>
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Closed FIXED    
Severity: Affects Some People CC: brnrd, danfe, danny
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (danny)
koobs: maintainer-feedback? (brnrd)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
configure patch
none
patch for mysql_drv.m4 none

Description Vikash Badal 2020-01-02 10:23:57 UTC
Created attachment 210385 [details]
configure patch

the configure stage current fails when using mariadb 10.x:

configure: error: Unsupported version of MySQL (no PROTOCOL_VERSION or ER_LOCK_DEADLOCK or ER_LOCK_WAIT_TIMEOUT or ER_LOCK_OR_ACTIVE_TRANSACTION or CR_ERROR_FIRST defined)

this is because CR_ERROR_FIRST is no longer present in library

attached patch files remove this check, however i do not know how to patch conditionally i.e only patch is using mariadb 10.x

is there a way to patch conditional ?
Comment 1 Vikash Badal 2020-01-02 10:24:51 UTC
Created attachment 210386 [details]
patch for mysql_drv.m4
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-02 10:30:16 UTC
Thank you for the report and initial patch Vikash

Something like checking the "mysql" DEFAULT_VERSION value in a condition and using EXTRA_PATCHES if the condition is true, should be ok

@Vikash Also, this should probably be resolved properly upstream, would you mind reporting the issue if you haven't already?

^Triage: Request feedback from databases/mariadb101-server maintainer on conditional patching advice
Comment 3 Vikash Badal 2020-01-02 14:32:26 UTC
(In reply to Kubilay Kocak from comment #2)

@Kubilay ticket:
https://sourceforge.net/p/dspam/bug-tracker/174/

there seems to be no activity since 2014 though.
Comment 4 commit-hook freebsd_committer 2020-07-22 14:21:45 UTC
A commit references this bug:

Author: danfe
Date: Wed Jul 22 14:20:58 UTC 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

Changes:
  head/mail/dspam/Makefile
  head/mail/dspam/files/patch-src_mysql__drv.c
Comment 5 Alexey Dokuchaev freebsd_committer 2020-07-22 14:25:15 UTC
Should be fixed as of ports r542858, please test and reopen the bug if anything's still missing.