summaryrefslogtreecommitdiff
path: root/databases/mariadb104-client/Makefile.common
blob: 145d8893ec27bfdfdb252d127c744285793aef17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# $NetBSD: Makefile.common,v 1.13 2021/08/05 11:21:23 nia Exp $
#
# used by databases/mariadb104-client/Makefile
# used by databases/mariadb104-server/Makefile

DISTNAME=	mariadb-10.4.20
CATEGORIES=	databases
MASTER_SITES=	https://downloads.mariadb.org/f/${DISTNAME}/source/
MASTER_SITES+=	https://archive.mariadb.org/${DISTNAME}/source/

MAINTAINER?=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://mariadb.org/
LICENSE=	gnu-gpl-v2

DISTINFO_FILE?=	${.CURDIR}/../../databases/mariadb104-client/distinfo
PATCHDIR?=	${.CURDIR}/../../databases/mariadb104-client/patches

USE_CMAKE=	yes
USE_LANGUAGES=	c c++
USE_TOOLS+=	perl:run pkg-config bison
USE_CURSES=	wide

PLIST_SRC=	${PLIST_SRC_DFLT}

.include "../../mk/bsd.prefs.mk"

#
# Use MySQL defaults if set.
#
MARIADB_DATADIR?=	${MYSQL_DATADIR:U${VARBASE}/db/mariadb}
MARIADB_CHARSET?=	${MYSQL_CHARSET:Uutf8mb4}
MARIADB_COLLATION?=	${MYSQL_COLLATION:Uutf8mb4_unicode_ci}
MARIADB_EXTRA_CHARSET?=	${MYSQL_EXTRA_CHARSET:Uall}

BUILD_DEFS+=		VARBASE

CMAKE_ARGS+=		-DCOMPILATION_COMMENT="pkgsrc"

CMAKE_ARGS+=		-DCMAKE_BUILD_TYPE="Release"

CMAKE_ARGS+=		-DINSTALL_BINDIR="bin"
CMAKE_ARGS+=		-DINSTALL_DOCDIR="share/doc/mysql"
CMAKE_ARGS+=		-DINSTALL_DOCREADMEDIR="share/doc/mysql"
CMAKE_ARGS+=		-DINSTALL_INCLUDEDIR="include/mysql"
CMAKE_ARGS+=		-DINSTALL_INFODIR="${PKGINFODIR}"
CMAKE_ARGS+=		-DINSTALL_LIBDIR="lib"
CMAKE_ARGS+=		-DINSTALL_MANDIR="${PKGMANDIR}"
CMAKE_ARGS+=		-DINSTALL_MYSQLSHAREDIR="share/mysql"
CMAKE_ARGS+=		-DINSTALL_MYSQLTESTDIR=""
CMAKE_ARGS+=		-DINSTALL_PLUGINDIR="lib/mysql/plugin"
CMAKE_ARGS+=		-DINSTALL_SBINDIR="sbin"
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=${MARIADB_DATADIR}

.if ${OPSYS} == "SunOS"
CMAKE_ARGS+=		-DWITH_MARIABACKUP=OFF
.endif

CMAKE_ARGS+=		-DWITH_UNIT_TESTS=OFF
CMAKE_ARGS+=		-DWITH_LIBWRAP=ON
CMAKE_ARGS+=		-DWITH_ZLIB="system"
CMAKE_ARGS+=		-DDEFAULT_CHARSET=${MARIADB_CHARSET}
CMAKE_ARGS+=		-DDEFAULT_COLLATION=${MARIADB_COLLATION:Q}
CMAKE_ARGS+=		-DWITH_EXTRA_CHARSETS=${MARIADB_EXTRA_CHARSET:Q}

CMAKE_ARGS+=		-DPLUGIN_EXAMPLE=NO
CMAKE_ARGS+=		-DPLUGIN_FEEDBACK=NO

# Requires Java
CMAKE_ARGS+=		-DCONNECT_WITH_JDBC=OFF

# Options which affect generation of includes
CMAKE_ARGS+=		-DWITH_ARIA_STORAGE_ENGINE=ON
CMAKE_ARGS+=		-DWITH_PARTITION_STORAGE_ENGINE=ON
CMAKE_ARGS+=		-DWITH_PERFSCHEMA_STORAGE_ENGINE=ON

CMAKE_ARGS+=		-DWITHOUT_MROONGA_STORAGE_ENGINE=ON

CMAKE_ARGS+=		-DENABLE_DTRACE=OFF

CMAKE_ARGS+=		-DTOKUDB_OK=OFF

# Ensure the correct DTrace ABI is used.
.if !empty(ABI)
CMAKE_ARGS+=		-DDTRACE_FLAGS="-${ABI}"
.endif

CFLAGS.SunOS+=		-fPIC

REPLACE_PERL+=		scripts/mytop.sh
REPLACE_PERL+=		sql-bench/*.sh

SUBST_CLASSES+=		perl
SUBST_STAGE.perl=	pre-configure
SUBST_FILES.perl=	scripts/CMakeLists.txt
SUBST_SED.perl=		-e "s,/usr/bin/perl,${TOOLS_PATH.perl},g"
SUBST_SED.perl+=	-e "s,/usr/local/bin/perl,${TOOLS_PATH.perl},g"

CHECK_INTERPRETER_SKIP+=	share/mysql/test/*
CHECK_PORTABILITY_SKIP+=	BUILD/compile-pentium-gcov

PKGCONFIG_OVERRIDE+=	support-files/mariadb.pc.in
PKGCONFIG_OVERRIDE+=	libmariadb/mariadb_config/libmariadb.pc.in

.include "../../devel/zlib/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
BUILDLINK_TRANSFORM+=	opt:-ldl:${BUILDLINK_LDADD.dl:Q}
.include "../../mk/pam.buildlink3.mk"
.include "../../mk/readline.buildlink3.mk"
.include "../../mk/krb5.buildlink3.mk"