git: 2c1a1c023aec - main - mail/dspam: fix configure with modern MariaDB
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jun 2024 15:47:37 UTC
The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=2c1a1c023aecd89feacdbeec17566b2629cfa1d0 commit 2c1a1c023aecd89feacdbeec17566b2629cfa1d0 Author: Vladimir Druzenko <vvd@FreeBSD.org> AuthorDate: 2024-06-09 15:44:49 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2024-06-09 15:44:49 +0000 mail/dspam: fix configure with modern MariaDB 1) Configure fails with error message: checking for MySQL client version >= 5.0.0... no configure: error: Required version of libmysqlclient not found It check "mysql_get_client_info() > 5", but modern MariaDB return Connector/C's version 3.x instead of MariaDB version. How to get the correct version found here: https://github.com/pali/DBD-MariaDB/commit/9743bec52db5e8f1beb2b31e4a55d6ea1a4edcdd While here: 2) remove GNU_CONFIGURE_MANPREFIX 3) fix make check-plist if build with MYSQL option ON only: ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: @dir lib/%%DSPAM_OWNER%% PR: 279253 Approved by: danny@dannywarren.com (maintainer, timeout 17 days) --- mail/dspam/Makefile | 2 -- mail/dspam/files/patch-configure | 24 ++++++++++++++++++++++++ mail/dspam/pkg-plist | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile index 95b5e46d295f..c556d22cff05 100644 --- a/mail/dspam/Makefile +++ b/mail/dspam/Makefile @@ -76,7 +76,6 @@ MAKE_JOBS_UNSAFE= yes USES= perl5 libtool pathfix shebangfix USE_LDCONFIG= yes GNU_CONFIGURE= yes -GNU_CONFIGURE_MANPREFIX=${PREFIX}/share CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib @@ -272,7 +271,6 @@ CONFIGURE_ARGS+= --with-mysql-includes=${LOCALBASE}/include/mysql \ --with-mysql-libraries=${LOCALBASE}/lib/mysql PLIST_SUB+= MYSQL="" _DBDRV_COUNT:= ${_DBDRV_COUNT}o -IGNORE_WITH_MYSQL= 105m 106m 1011m . if ${PORT_OPTIONS:MMYSQL_COMPRESS} CONFIGURE_ARGS+= --enable-client-compression . endif diff --git a/mail/dspam/files/patch-configure b/mail/dspam/files/patch-configure new file mode 100644 index 000000000000..723a4801d900 --- /dev/null +++ b/mail/dspam/files/patch-configure @@ -0,0 +1,24 @@ +--- configure.orig 2012-04-23 17:53:49 UTC ++++ configure +@@ -13614,6 +13614,13 @@ main () + { + + int is_ok = 0; ++#if defined(MARIADB_PACKAGE_VERSION) && defined(MARIADB_PACKAGE_VERSION_ID) && MARIADB_PACKAGE_VERSION_ID >= 30000 ++ size_t version; ++ if (mariadb_get_infov(NULL, MARIADB_CLIENT_VERSION_ID, &version) != 0) ++ version = mysql_get_client_version(); ++ if (version >= 100000) ++ is_ok = 1; ++#else + const char *info = mysql_get_client_info(); + char *i = strdup(info); + char *m = strtok(i, "."); +@@ -13621,6 +13628,7 @@ main () + if (atoi(m) >= 5) + is_ok = 1; + free (i); ++#endif + return is_ok ? 0 : 1; + + ; diff --git a/mail/dspam/pkg-plist b/mail/dspam/pkg-plist index 6d193dc33166..0fd518e87269 100644 --- a/mail/dspam/pkg-plist +++ b/mail/dspam/pkg-plist @@ -214,6 +214,7 @@ libdata/pkgconfig/dspam.pc @(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%) %%DSPAM_HOME%%/firstrun.txt.sample @(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%) %%DSPAM_HOME%%/firstspam.txt.sample @(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%) %%DSPAM_HOME%%/quarantinefull.txt.sample +@comment @dir lib/%%DSPAM_OWNER%% @dir(%%DSPAM_HOME_OWNER%%,%%DSPAM_HOME_GROUP%%,%%DSPAM_HOME_MODE%%) %%DSPAM_HOME%% @dir(%%DSPAM_OWNER%%,%%DSPAM_GROUP%%) %%LOG_DIR%% @dir(%%DSPAM_OWNER%%,%%DSPAM_GROUP%%) %%RUN_DIR%%