head	1.10;
access;
symbols
	pkgsrc-2026Q2:1.8.0.2
	pkgsrc-2026Q2-base:1.8
	pkgsrc-2026Q1:1.6.0.4
	pkgsrc-2026Q1-base:1.6
	pkgsrc-2025Q4:1.6.0.2
	pkgsrc-2025Q4-base:1.6
	pkgsrc-2025Q3:1.4.0.4
	pkgsrc-2025Q3-base:1.4
	pkgsrc-2025Q2:1.4.0.2
	pkgsrc-2025Q2-base:1.4
	pkgsrc-2025Q1:1.2.0.6
	pkgsrc-2025Q1-base:1.2
	pkgsrc-2024Q4:1.2.0.4
	pkgsrc-2024Q4-base:1.2
	pkgsrc-2024Q3:1.2.0.2
	pkgsrc-2024Q3-base:1.2;
locks; strict;
comment	@# @;


1.10
date	2026.09.07.06.43.47;	author jnemeth;	state Exp;
branches;
next	1.9;
commitid	sFyVIXW61jrkLEUG;

1.9
date	2026.06.29.05.53.09;	author jnemeth;	state Exp;
branches;
next	1.8;
commitid	EGpZpbX4pR2sJELG;

1.8
date	2026.05.31.10.47.48;	author jnemeth;	state Exp;
branches;
next	1.7;
commitid	VSBBktje29j7iXHG;

1.7
date	2026.03.30.03.41.24;	author jnemeth;	state Exp;
branches;
next	1.6;
commitid	BhWuDDkLH2YCVWzG;

1.6
date	2025.11.24.05.58.26;	author jnemeth;	state Exp;
branches;
next	1.5;
commitid	4vka9pcHFAiVJLjG;

1.5
date	2025.10.22.07.21.48;	author jnemeth;	state Exp;
branches;
next	1.4;
commitid	68V0ZDHmE99BexfG;

1.4
date	2025.05.06.09.38.26;	author wiz;	state Exp;
branches;
next	1.3;
commitid	VlKzQ9s4VesXrPTF;

1.3
date	2025.04.21.16.29.29;	author wiz;	state Exp;
branches;
next	1.2;
commitid	t1cigBdf8AJPcWRF;

1.2
date	2024.08.25.06.18.30;	author wiz;	state Exp;
branches;
next	1.1;
commitid	BcrSL94SO85mvanF;

1.1
date	2024.08.05.01.23.58;	author jnemeth;	state Exp;
branches;
next	;
commitid	C2Nrpx6JFvBnwzkF;


desc
@@


1.10
log
@Update to MySQL Cluster 8.0.48:

https://dev.mysql.com/doc/relnotes/mysql-cluster/8.0/en/news-8-0-48.html
@
text
@# $NetBSD: Makefile.common,v 1.9 2026/06/29 05:53:09 jnemeth Exp $
#
# used by databases/mysql-cluster/Makefile

DISTNAME=	mysql-cluster-8.0.48
BOOSTVER=	1.77.0
CATEGORIES=	databases
MASTER_SITES=	${MASTER_SITE_GITHUB:=mysql/}
MASTER_SITES+=	https://boostorg.jfrog.io/artifactory/main/release/${BOOSTVER}/source/
DISTFILES=	${DEFAULT_DISTFILES}
DISTFILES+=	boost_${BOOSTVER:S/./_/g}.tar.bz2
GITHUB_PROJECT=	mysql-server
GITHUB_TAG=	${DISTNAME}

MAINTAINER?=	pkgsrc-users@@NetBSD.org
HOMEPAGE=	https://www.mysql.com/products/cluster/
LICENSE=	gnu-gpl-v2

.include "../../devel/cmake/build.mk"

USE_LANGUAGES=		c c++03
USE_CXX_FEATURES=	c++14
USE_TOOLS+=		bash gmake perl:run python:run bison
#USE_ZLIB=		yes

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

.include "options.mk"

# MYSQL_USER		username of the database administrator
# MYSQL_GROUP		group of the database administrator
# MYSQL_DATADIR		home directory (location of the databases)
# MYSQL_PIDFILE		process ID file
# MYSQL_CHARSET		default character set
# MYSQL_EXTRA_CHARSET	additional character set to be compiled in
MYSQL_USER?=		mysql
MYSQL_GROUP?=		mysql
MYSQL_DATADIR?=		${VARBASE}/mysql
MYSQL_PIDFILE?=		${MYSQL_DATADIR}/${HOST}.pid
MYSQL_CHARSET?=		latin1
MYSQL_COLLATION?=	latin1_swedish_ci
MYSQL_EXTRA_CHARSET?=	all

PKG_USERS_VARS+=	MYSQL_USER
PKG_GROUPS_VARS+=	MYSQL_GROUP

CONFIG_SHELL=		${TOOLS_PATH.bash}

CFLAGS.IRIX+=		-DIRIX5 -DNEEDS_BSTRING_H

BUILD_DEFS+=		VARBASE

# paths
CMAKE_CONFIGURE_ARGS+=		-DWITH_NDBCLUSTER=1

CMAKE_CONFIGURE_ARGS+=		-DINSTALL_DOCDIR="share/doc/mysql"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_DOCREADMEDIR="share/doc/mysql"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_INCLUDEDIR="include/mysql"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_INFODIR="info"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_MANDIR="${PKGMANDIR}"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_MYSQLSHAREDIR="share/mysql"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_MYSQLTESTDIR="share/mysql/test"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_PLUGINDIR="lib/mysql/plugin"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_SBINDIR="sbin"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_SCRIPTDIR="bin"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_SQLBENCHDIR="share/mysql/sql-bench"
CMAKE_CONFIGURE_ARGS+=		-DINSTALL_SUPPORTFILESDIR="share/mysql"
CMAKE_CONFIGURE_ARGS+=		-DMYSQL_DATADIR=${MYSQL_DATADIR}
CMAKE_CONFIGURE_ARGS+=		-DFORCE_INSOURCE_BUILD=1

CMAKE_CONFIGURE_ARGS+=		-DWITH_BOOST=${WRKDIR}/boost_${BOOSTVER:S/./_/g}
CMAKE_CONFIGURE_ARGS+=		-DWITH_ICU="system"
CMAKE_CONFIGURE_ARGS+=		-UWITH_LIBEVENT="system"
CMAKE_CONFIGURE_ARGS+=		-DWITH_BUNDLED_LIBEVENT=ON
#CMAKE_CONFIGURE_ARGS+=		-DWITH_ZLIB="system"
#CMAKE_CONFIGURE_ARGS+=		-DWITH_ZLIB="bundled"
CMAKE_CONFIGURE_ARGS+=		-DDEFAULT_CHARSET=${MYSQL_CHARSET}
CMAKE_CONFIGURE_ARGS+=		-DDEFAULT_COLLATION=${MYSQL_COLLATION:Q}
CMAKE_CONFIGURE_ARGS+=		-DWITH_EXTRA_CHARSETS=${MYSQL_EXTRA_CHARSET:Q}
CMAKE_CONFIGURE_ARGS+=		-DWITH_NDB_JAVA=OFF
CMAKE_CONFIGURE_ARGS+=		-DWITH_UNIT_TESTS=OFF
CMAKE_CONFIGURE_ARGS+=		-DWITH_SSL=system
CMAKE_CONFIGURE_ARGS+=		-DWITH_PROTOBUF="system"

# MySQL 5 depends on builtin functions enabled with i486 and later with GCC.
.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386"
GNU_ARCH.i386=		i486
CFLAGS+=		-march=i486
.endif

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

CPPFLAGS+=		-Dunix
CFLAGS+=		-D__STDC_FORMAT_MACROS=1 # always defined too late

CFLAGS+=		-fPIC -DPIC
CXXFLAGS+=		-fPIC -DPIC

# force HAVE_CURSES_H on Solaris since the configure script is broken
# and does not properly detect this, breaking the build later on.  Also
# explicitly disable epoll support as it is Linux-specific.
CMAKE_CONFIGURE_ARGS.SunOS+=	-DHAVE_SYS_EPOLL_H=NO -DHAVE_EPOLL_CREATE=NO
CFLAGS.SunOS+=			-DHAVE_CURSES_H
CXXFLAGS.SunOS+=		-DHAVE_CURSES_H

.include "../../mk/pthread.buildlink3.mk"

.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "pth")
CFLAGS+=		-DSIGNALS_DONT_BREAK_READ
CXXFLAGS+=		-DSIGNALS_DONT_BREAK_READ
.endif

LDFLAGS+=		${COMPILER_RPATH_FLAG}${PREFIX}/lib/mysql

SUBST_CLASSES+=		scr
SUBST_STAGE.scr=	pre-configure
SUBST_FILES.scr=	scripts/mysqld_safe.sh \
			support-files/mysql.server.sh
SUBST_SED.scr=		-e "s,chown,${CHOWN},g"
SUBST_SED.scr+=		-e "s,/bin/sh,${RCD_SCRIPTS_SHELL},g"
SUBST_MESSAGE.scr=	Fixing scripts.

## XXX This should really be done as a patch, but what and where?
#SUBST_CLASSES+=		apitest
#SUBST_STAGE.apitest=	post-configure
#SUBST_FILES.apitest=	libmysql/CMakeFiles/libmysql_api_test.dir/link.txt
#SUBST_SED.apitest=	-e "s;CMakeFiles;-Wl,-R${WRKSRC}/library_output_directory &;"
#SUBST_MESSAGE.apitest=	Fixing library runtime paths.

# SUBST_CLASSES+=		fixpaths
# SUBST_STAGE.fixpaths=	post-install
# SUBST_FILES.fixpaths=	${DESTDIR}${PREFIX}/share/doc/mysql/INFO_BIN
# SUBST_SED.fixpaths=	-e "s,${WRAPPER_BINDIR}/gcc,${CCPATH},g"
# SUBST_SED.fixpaths+=	-e "s,${WRAPPER_BINDIR}/g++,${CXXPATH},g"

CMAKE_CONFIGURE_ARGS+=	-DWITH_EDITLINE=bundled

## Remove internal boost. Even though external boost is detected, the build might fail.
#post-extract: remove-boost
#.PHONY: remove-boost
#remove-boost:
#	${RM} -f -r ${WRKSRC}/include/boost_1_77_0

#.include "../../devel/boost-libs/buildlink3.mk"
#.include "../../devel/libevent/buildlink3.mk"
.include "../../devel/ncurses/buildlink3.mk"
.include "../../devel/protobuf/buildlink3.mk"
#.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/icu/buildlink3.mk"
@


1.9
log
@Update to MySQL Cluster 8.0.47:

https://dev.mysql.com/doc/relnotes/mysql-cluster/8.0/en/news-8-0-47.html
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.8 2026/05/31 10:47:48 jnemeth Exp $
d5 1
a5 1
DISTNAME=	mysql-cluster-8.0.47
@


1.8
log
@Upgrade to MySQL Cluster 8.0.46.

Changes in MySQL NDB Cluster 8.0.46 (2026-04-24)

   MySQL NDB Cluster 8.0.46 is a new release of NDB 8.0, based on
   MySQL Server 8.0 and including features in version 8.0 of the
   NDB storage engine, as well as fixing recently discovered bugs
   in previous NDB Cluster releases.

   Obtaining NDB Cluster 8.0.  NDB Cluster 8.0 source code and
   binaries can be obtained from https://dev.mysql.com/downloads/cluster/.

   For an overview of changes made in NDB Cluster 8.0, see What is
   New in MySQL NDB Cluster 8.0.

   This release also incorporates all bug fixes and changes made
   in previous NDB Cluster releases, as well as all bug fixes and
   feature changes which were added in mainline MySQL 8.0 through
   MySQL 8.0.46 (see Changes in MySQL 8.0.46 (2026-04-21)).
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.7 2026/03/30 03:41:24 jnemeth Exp $
d5 1
a5 1
DISTNAME=	mysql-cluster-8.0.46
@


1.7
log
@Update to MySQL Cluster 8.0.45:

Changes in MySQL 8.0.45 (2026-01-20)

   Note

   These release notes were created with the assistance of MySQL HeatWave GenAI.
     * InnoDB Notes
     * Optimizer Notes
     * Packaging Notes
     * Bugs Fixed

InnoDB Notes

     * InnoDB: InnoDB redo logging error messages now include the current LSN and redo log capacity
       information. A new warning code ER_IB_WRN_REDO_DISABLED_INFO is added which includes the
       current LSN. A new error code ER_IB_MSG_LOG_WRITER_WAIT_ON_NEW_LOG_FILE_INFO is added to
       include the current log capacity and the current log capacity used. The MONITOR output has
       been enhanced to include redo log capacity details and current log capacity.
       The warning ER_IB_WRN_REDO_DISABLED was removed, as was the error
       ER_IB_MSG_LOG_WRITER_WAIT_ON_NEW_LOG_FILE. (Bug #37645185)
     * Fixed an issue related to bulk inserts. (Bug #38208188)

Optimizer Notes

     * Fixed an issue relating to Common Table Expressions (CTE). (Bug #38573285)
     * Fixed an issue related to executing specific SQL queries. (Bug #38448700)
     * Fixed an issue relating to SHOW CREATE TABLE. (Bug #38298692)
     * Queries which used REGEXP took longer to execute as prepared statements than as direct
       queries. (Bug #114056, Bug #36326728)

Packaging Notes

     * For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL
       Server has been updated to version 3.0.18. For more information, see OpenSSL 3.0 Series
       Release Notes. (Bug #38632932)

Bugs Fixed

     * InnoDB: Under certain circumstances, when using the que_eval_sql interface, a race condition
       could occur. (Bug #118705, Bug #38310595)
     * Binary log purged before persisted binlog_expire_* options were loaded. (Bug #38554467)
     * When 2 of 6 instances in a geographically dispersed InnoDB Cluster lost connectivity, the
       primary server became unresponsive, causing the COMMIT and INSERT operations to become
       unresponsive as well. (Bug #38380392)
     * Fixed several issues relating to Thread Pool blocking connections from closing. (Bug
       #38170188, Bug #36782728, Bug #38549372)
     * GTID gaps were generated because of the replica- skip-errors option. (Bug #28590993)
     * If server was started on Windows platforms with --skip-grant-tables, privileges were not
       checked and remote connections were not permitted. As a result, the server might not start.
       (Bug #118805, Bug #38328780)
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.6 2025/11/24 05:58:26 jnemeth Exp $
d5 1
a5 1
DISTNAME=	mysql-cluster-8.0.45
@


1.6
log
@mysql80-cluster: update to 8.0.44
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.5 2025/10/22 07:21:48 jnemeth Exp $
d5 1
a5 1
DISTNAME=	mysql-cluster-8.0.44
@


1.5
log
@Build fix based on joerg@@'s mysql80-server patches.  Also, a couple
of pkglint fixes while here.

No PKGREVISION bump as it didn't work before.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.4 2025/05/06 09:38:26 wiz Exp $
d5 1
a5 1
DISTNAME=	mysql-cluster-gpl-8.0.39
d8 1
a8 2
#MASTER_SITES=	${MASTER_SITE_MYSQL:=MySQL-Cluster-8.0/}
MASTER_SITES=	https://dev.mysql.com/get/Downloads/MySQL-Cluster-8.0/
d12 2
d81 1
a81 1
CMAKE_CONFIGURE_ARGS+=		-UWITH_UNIT_TESTS
@


1.4
log
@mysql80-cluster: remove unused SOEXT
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.3 2025/04/21 16:29:29 wiz Exp $
d18 2
a19 1
USE_CMAKE=		yes
d105 2
a106 2
CFLAGS.SunOS+=		-DHAVE_CURSES_H
CXXFLAGS.SunOS+=	-DHAVE_CURSES_H
@


1.3
log
@mysql*-cluster: remove Interix support
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.2 2024/08/25 06:18:30 wiz Exp $
a136 6
.if ${SHLIB_TYPE} == "dylib"
SOEXT=	"dylib"
.else
SOEXT=	"so"
.endif

@


1.2
log
@*: replace CMAKE_ARGS with CMAKE_CONFIGURE_ARGS
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.1 2024/08/05 01:23:58 jnemeth Exp $
a96 1
.if ${OPSYS} != "Interix"
a98 1
.endif
@


1.1
log
@databases/mysql80-cluster: import mysql-cluster-8.0.39

MySQL Cluster is a highly scalable, real-time, ACID-compliant
transactional database, combining 99.999% availability with the
low TCO of open source.

Designed around a distributed, multi-master architecture with no
single point of failure, MySQL Cluster scales horizontally on
commodity hardware to serve read and write intensive workloads,
accessed via SQL and NoSQL interfaces.

This package contains MySQL server version 8.0.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.16 2019/11/02 15:38:02 rillig Exp $
d52 1
a52 1
CMAKE_ARGS+=		-DWITH_NDBCLUSTER=1
d54 28
a81 28
CMAKE_ARGS+=		-DINSTALL_DOCDIR="share/doc/mysql"
CMAKE_ARGS+=		-DINSTALL_DOCREADMEDIR="share/doc/mysql"
CMAKE_ARGS+=		-DINSTALL_INCLUDEDIR="include/mysql"
CMAKE_ARGS+=		-DINSTALL_INFODIR="info"
CMAKE_ARGS+=		-DINSTALL_MANDIR="${PKGMANDIR}"
CMAKE_ARGS+=		-DINSTALL_MYSQLSHAREDIR="share/mysql"
CMAKE_ARGS+=		-DINSTALL_MYSQLTESTDIR="share/mysql/test"
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+=		-DMYSQL_DATADIR=${MYSQL_DATADIR}
CMAKE_ARGS+=		-DFORCE_INSOURCE_BUILD=1

CMAKE_ARGS+=		-DWITH_BOOST=${WRKDIR}/boost_${BOOSTVER:S/./_/g}
CMAKE_ARGS+=		-DWITH_ICU="system"
CMAKE_ARGS+=		-UWITH_LIBEVENT="system"
CMAKE_ARGS+=		-DWITH_BUNDLED_LIBEVENT=ON
#CMAKE_ARGS+=		-DWITH_ZLIB="system"
#CMAKE_ARGS+=		-DWITH_ZLIB="bundled"
CMAKE_ARGS+=		-DDEFAULT_CHARSET=${MYSQL_CHARSET}
CMAKE_ARGS+=		-DDEFAULT_COLLATION=${MYSQL_COLLATION:Q}
CMAKE_ARGS+=		-DWITH_EXTRA_CHARSETS=${MYSQL_EXTRA_CHARSET:Q}
CMAKE_ARGS+=		-DWITH_NDB_JAVA=OFF
CMAKE_ARGS+=		-UWITH_UNIT_TESTS
CMAKE_ARGS+=		-DWITH_SSL=system
CMAKE_ARGS+=		-DWITH_PROTOBUF="system"
d91 1
a91 1
CMAKE_ARGS+=		-DDTRACE_FLAGS="-${ABI}"
d105 1
a105 1
CMAKE_ARGS.SunOS+=	-DHAVE_SYS_EPOLL_H=NO -DHAVE_EPOLL_CREATE=NO
d145 1
a145 1
CMAKE_ARGS+=	-DWITH_EDITLINE=bundled
@

