[BACK]Return to Makefile.common CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / databases / mysql56-client

File: [cvs.NetBSD.org] / pkgsrc / databases / mysql56-client / Makefile.common (download)

Revision 1.60, Fri Feb 5 09:28:07 2021 UTC (3 years, 2 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2024Q1-base, pkgsrc-2024Q1, pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, HEAD
Changes since 1.59: +5 -9 lines

mysql56: updated to 5.6.51

Changes in MySQL 5.6.51

Security Notes

The linked OpenSSL library for MySQL Server has been updated to version 1.1.1i. Issues fixed in the new OpenSSL version are described at https://www.openssl.org/news/cl111.txt and https://www.openssl.org/news/vulnerabilities.html.

Bugs Fixed

InnoDB: The full-text search synchronization thread attempted to read a previously-freed word from the index cache.

The server did not handle all cases of the WHERE_CONDITION optimization correctly.

Privileges for some INFORMATION_SCHEMA tables were checked incorrectly.

In certain cases, the server did not handle multiply-nested subqueries correctly.

A buffer overflow in the client library was fixed.

# $NetBSD: Makefile.common,v 1.60 2021/02/05 09:28:07 adam Exp $
#
# used by databases/mysql56-client/Makefile
# used by databases/mysql56-server/Makefile

DISTNAME=	mysql-5.6.51
CATEGORIES=	databases
MASTER_SITES=	${MASTER_SITE_MYSQL:=MySQL-5.6/}

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

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

USE_CMAKE=		yes
USE_LANGUAGES=		c c++
USE_TOOLS+=		bash gmake perl:run
USE_GCC_RUNTIME=	yes

CHECK_PORTABILITY_SKIP+=	packaging/deb-in/mysql-packagesource-server.config.in

.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_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+=	-DWITH_EDITLINE="system"
CMAKE_ARGS+=	-DWITH_ZLIB="system"
CMAKE_ARGS+=	-DDEFAULT_CHARSET=${MYSQL_CHARSET}
CMAKE_ARGS+=	-DDEFAULT_COLLATION=${MYSQL_COLLATION}
CMAKE_ARGS+=	-DWITH_EXTRA_CHARSETS=${MYSQL_EXTRA_CHARSET:Q}
# Avoid disclosure of files from a client to a malicious server, described here:
# https://gwillem.gitlab.io/2019/01/17/adminer-4.6.2-file-disclosure-vulnerability/
CMAKE_ARGS+=	-DENABLED_LOCAL_INFILE=OFF

# 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_ARGS+=	-DDTRACE_FLAGS="-${ABI}"
.endif

CPPFLAGS+=	-Dunix
CFLAGS+=	-DUSE_OLD_FUNCTIONS # 3.23.x compat
CFLAGS+=	-D__STDC_FORMAT_MACROS=1 # always defined too late

.if ${OPSYS} != "Interix"
CFLAGS+=	-fPIC -DPIC
CXXFLAGS+=	-fPIC -DPIC
.endif

CMAKE_ARGS.SunOS+=	-DFORCE_UNSUPPORTED_COMPILER=YES

# 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_ARGS.SunOS+=	-DHAVE_SYS_EPOLL_H=NO
CMAKE_ARGS.SunOS+=	-DEVENT__HAVE_EPOLL=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/mysql_install_db.sh
SUBST_FILES.scr+=	scripts/mysql_secure_installation.sh
SUBST_FILES.scr+=	scripts/mysqld_safe.sh
SUBST_FILES.scr+=	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_SED.scr+=		-e "s,@SHELL_PATH@,${RCD_SCRIPTS_SHELL},g"
SUBST_MESSAGE.scr=	Fixing scripts.
SUBST_NOOP_OK.scr=	yes # since RCD_SCRIPTS_SHELL may be /bin/sh

SUBST_CLASSES+=		fixpaths
SUBST_STAGE.fixpaths=	post-install
SUBST_FILES.fixpaths=	${DESTDIR}${PREFIX}/bin/mysqlbug
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"
SUBST_NOOP_OK.fixpaths=	yes # not needed for mysql-client-5.6.47 on NetBSD

# Don't use the base system "libedit" under NetBSD because MySQL expects
# an incompatible prototype for "rl_completion_entry_function".
.if ${OPSYS} == "NetBSD"
USE_BUILTIN.editline=	no
.endif

.include "../../devel/editline/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"