pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mariadb104: compatibility with MySQL packages



Module Name:	pkgsrc-wip
Committed By:	nia <nia%netbsd.org@localhost>
Pushed By:	nee
Date:		Thu Apr 29 13:19:02 2021 +0200
Changeset:	807a430915a179aeb53b76fda75314263079d48d

Modified Files:
	mariadb104-client/Makefile.common
	mariadb104-server/Makefile

Log Message:
mariadb104: compatibility with MySQL packages

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=807a430915a179aeb53b76fda75314263079d48d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mariadb104-client/Makefile.common | 41 ++++++++++++++++++++++++++++-----------
 mariadb104-server/Makefile        | 14 +++++++++++++
 2 files changed, 44 insertions(+), 11 deletions(-)

diffs:
diff --git a/mariadb104-client/Makefile.common b/mariadb104-client/Makefile.common
index c89ec34881..4630ec3f61 100644
--- a/mariadb104-client/Makefile.common
+++ b/mariadb104-client/Makefile.common
@@ -23,13 +23,32 @@ PLIST_SRC=	${PLIST_SRC_DFLT}
 
 .include "../../mk/bsd.prefs.mk"
 
-# MYSQL_DATADIR		home directory (location of the databases)
-# MYSQL_CHARSET		default character set
-# MYSQL_EXTRA_CHARSET	additional character set to be compiled in
-MYSQL_DATADIR?=		${VARBASE}/db/mariadb
-MYSQL_CHARSET?=		utf8mb4
-MYSQL_COLLATION?=	utf8mb4_unicode_ci
-MYSQL_EXTRA_CHARSET?=	all
+# home directory (location of the databases)
+.if !empty(MYSQL_DATADIR)
+MARIADB_DATADIR?=	${MYSQL_DATADIR}
+.else
+MARIADB_DATADIR?=	${VARBASE}/db/mariadb
+.endif
+
+# default character set
+.if !empty(MYSQL_CHARSET)
+MARIADB_CHARSET?=	${MYSQL_CHARSET}
+.else
+MARIADB_CHARSET?=	utf8mb4
+.endif
+
+# additional character set to be compiled in
+.if !empty(MYSQL_COLLATION)
+MARIADB_COLLATION?=	${MYSQL_COLLATION}
+.else
+MARIADB_COLLATION?=	utf8mb4_unicode_ci
+.endif
+
+.if !empty(MYSQL_EXTRA_CHARSET)
+MARIADB_EXTRA_CHARSET?=	${MYSQL_EXTRA_CHARSET}
+.else
+MARIADB_EXTRA_CHARSET?=	all
+.endif
 
 BUILD_DEFS+=		VARBASE
 
@@ -48,13 +67,13 @@ CMAKE_ARGS+=		-DINSTALL_SCRIPTDIR="bin"
 CMAKE_ARGS+=		-DINSTALL_SQLBENCHDIR="share/mysql/sql-bench"
 CMAKE_ARGS+=		-DINSTALL_SUPPORTFILESDIR="share/mysql"
 CMAKE_ARGS+=		-DINSTALL_SYSCONFDIR="${PKG_SYSCONFDIR}"
-CMAKE_ARGS+=		-DMYSQL_DATADIR=${MYSQL_DATADIR}
+CMAKE_ARGS+=		-DMYSQL_DATADIR=${MARIADB_DATADIR}
 
 CMAKE_ARGS+=		-DWITH_LIBWRAP=ON
 CMAKE_ARGS+=		-DWITH_ZLIB="system"
-CMAKE_ARGS+=		-DDEFAULT_CHARSET=${MYSQL_CHARSET}
-CMAKE_ARGS+=		-DDEFAULT_COLLATION=${MYSQL_COLLATION:Q}
-CMAKE_ARGS+=		-DWITH_EXTRA_CHARSETS=${MYSQL_EXTRA_CHARSET:Q}
+CMAKE_ARGS+=		-DDEFAULT_CHARSET=${MARIADB_CHARSET}
+CMAKE_ARGS+=		-DDEFAULT_COLLATION=${MARIADB_COLLATION:Q}
+CMAKE_ARGS+=		-DWITH_EXTRA_CHARSETS=${MARIADB_EXTRA_CHARSET:Q}
 
 # Options which affect generation of includes
 CMAKE_ARGS+=		-DWITH_ARIA_STORAGE_ENGINE=ON
diff --git a/mariadb104-server/Makefile b/mariadb104-server/Makefile
index 916b4571e6..56a7ff18fa 100644
--- a/mariadb104-server/Makefile
+++ b/mariadb104-server/Makefile
@@ -24,9 +24,23 @@ BUILD_DEFS+=		VARBASE
 
 .include "../../mk/bsd.fast.prefs.mk"
 
+.if !empty(MYSQL_DATADIR)
+MARIADB_DATADIR?=	${MYSQL_DATADIR}
+.else
 MARIADB_DATADIR?=	${VARBASE}/db/mariadb
+.endif
+
+.if !empty(MYSQL_USER)
+MARIADB_USER?=		${MYSQL_USER}
+.else
 MARIADB_USER?=		mariadb
+.endif
+
+.if !empty(MYSQL_GROUP)
+MARIADB_GROUP?=		${MYSQL_GROUP}
+.else
 MARIADB_GROUP?=		mariadb
+.endif
 
 PKG_USERS_VARS+=	MARIADB_USER
 PKG_GROUPS_VARS+=	MARIADB_GROUP


Home | Main Index | Thread Index | Old Index