mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
databases/mariadb100-server: use options helpers
- Use options helpers - Use GCC on i386 versions of FreeBSD later than 10.1-RELEASE PR: 196122 Differential Revision: https://reviews.freebsd.org/D1535 Submitted by: Bernard Spil <spil.oss@gmail.com> Approved by: maintainer timeout (3 weeks) Approved by: swills (maintainer)
This commit is contained in:
parent
9e52fdc6c8
commit
7a9da55494
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=377185
@ -24,15 +24,17 @@ USES= bison:build cmake execinfo gmake shebangfix
|
||||
SHEBANG_FILES= scripts/*.sh
|
||||
SITESDIR= mariadb/mariadb-${PORTVERSION}/source
|
||||
|
||||
BROKEN_arm= Does not compile on arm
|
||||
BROKEN_armv6= Does not compile on arm
|
||||
|
||||
OPTIONS_DEFINE= INNODB SSL OPENSSL PORTSSL FASTMTX
|
||||
OPTIONS_DEFAULT= SSL
|
||||
OPTIONS_DEFINE= FASTMTX
|
||||
OPTIONS_RADIO= SSL
|
||||
OPTIONS_RADIO_SSL= BUNDLED_SSL OPENSSL WITHOUT_SSL
|
||||
OPTIONS_DEFAULT+= OPENSSL
|
||||
NO_OPTIONS_SORT= yes
|
||||
|
||||
FASTMTX_DESC= Replace mutexes with spinlocks
|
||||
OPENSSL_DESC= Use OpenSSL instead of bundled yassl
|
||||
PORTSSL_DESC= Use OpenSSL from port (requires OPENSSL to be set)
|
||||
BUNDLED_SSL_DESC= SSL/TLS support via (bundled) CyaSSL
|
||||
FASTMTX_DESC= Replace mutexes with spinlocks
|
||||
WITHOUT_SSL_DESC= No SSL/TLS support
|
||||
|
||||
CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mysql" \
|
||||
-DINSTALL_DOCREADMEDIR="share/doc/mysql" \
|
||||
@ -61,58 +63,34 @@ CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mysql" \
|
||||
|
||||
DATADIR= ${PREFIX}/share/mysql
|
||||
|
||||
# MySQL-Server options
|
||||
.if !defined(CLIENT_ONLY)
|
||||
# MySQL-Server options
|
||||
USE_MYSQL= yes
|
||||
OPTIONS_DEFINE+= INNODB MROONGA OQGRAPH MAXKEY
|
||||
OPTIONS_DEFINE+= INNODB MAXKEY MROONGA OQGRAPH
|
||||
OPTIONS_DEFAULT+= MAXKEY
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
INNODB_DESC= Build InnoDB engine next to XtraDB
|
||||
MAXKEY_DESC= Change max key length from 1000 to 4000
|
||||
MROONGA_DESC= Mroonga Full Text Search engine (gcc)
|
||||
OQGRAPH_DESC= Open Query Graph Computation engine (gcc)
|
||||
MAXKEY_DESC= Change max key length from 1000 to 4000
|
||||
.endif
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
BUNDLED_SSL_CMAKE_ON= -DWITH_SSL=bundled
|
||||
FASTMX_CMAKE_ON= -DWITH_FAST_MUTEXES=1
|
||||
OPENSSL_CMAKE_ON= -DWITH_SSL=yes
|
||||
OPENSSL_USE= OPENSSL=yes
|
||||
WITHOUT_SSL_CMAKE_ON= -DWITH_SSL=no
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000012
|
||||
CMAKE_ARGS+= -DWITH_JEMALLOC="system"
|
||||
.else
|
||||
CMAKE_ARGS+= -DWITH_JEMALLOC="no"
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MSSL}
|
||||
. if exists(${LOCALBASE}/include/openssl/opensslv.h)
|
||||
. if !${PORT_OPTIONS:MOPENSSL} || !${PORT_OPTIONS:MPORTSSL}
|
||||
IGNORE= security/openssl package is installed. To build this either select the OPENSSL and PORTSSL options or deinstall openssl
|
||||
. endif
|
||||
. endif
|
||||
. if ${PORT_OPTIONS:MOPENSSL}
|
||||
USE_OPENSSL= yes
|
||||
. if !${PORT_OPTIONS:MPORTSSL}
|
||||
WITH_OPENSSL_BASE= yes
|
||||
. else
|
||||
WITH_OPENSSL_PORT= yes
|
||||
. endif
|
||||
CMAKE_ARGS+= -DWITH_SSL=yes
|
||||
. else
|
||||
CMAKE_ARGS+= -DWITH_SSL=bundled
|
||||
. endif
|
||||
.else
|
||||
CMAKE_FLAGS+= -DWITH_SSL=no
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MFASTMTX}
|
||||
CMAKE_ARGS+= -DWITH_FAST_MUTEXES=1
|
||||
.endif
|
||||
|
||||
# MySQL-Client part
|
||||
.if defined(CLIENT_ONLY)
|
||||
# MySQL-Client part
|
||||
USES+= readline
|
||||
.else
|
||||
# MySQL-Server part
|
||||
|
||||
CONFLICTS_INSTALL= mysql[0-9][0-9]-server-* mariadb[0-9][0-9]-server-* percona[0-9][0-9]-server-*
|
||||
CONFLICTS_INSTALL= mysql*-server-* \
|
||||
mariadb[0-9][0-9]-server-* \
|
||||
percona*-server-*
|
||||
|
||||
USE_MYSQL= yes
|
||||
WANT_MYSQL_VER= 100m
|
||||
@ -123,34 +101,13 @@ CMAKE_ARGS+= -DWITH_EMBEDDED_SERVER="ON" \
|
||||
-DCMAKE_SKIP_BUILD_RPATH:BOOL=YES \
|
||||
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1
|
||||
|
||||
. if empty(PORT_OPTIONS:MINNODB)
|
||||
PLIST_SUB+= INNODB="@comment "
|
||||
. else
|
||||
CMAKE_ARGS+= -DWITHOUT_INNOBASE=1
|
||||
PLIST_SUB+= INNODB=""
|
||||
. endif
|
||||
|
||||
. if empty(PORT_OPTIONS:MMROONGA)
|
||||
CMAKE_ARGS+= -DWITHOUT_MROONGA=1
|
||||
PLIST_SUB+= MROONGA="@comment "
|
||||
. else
|
||||
USE_GCC?= yes
|
||||
CMAKE_ARGS+= -DWITH_MROONGA_STORAGE_ENGINE=1
|
||||
PLIST_SUB+= MROONGA=""
|
||||
. endif
|
||||
|
||||
. if empty(PORT_OPTIONS:MOQGRAPH)
|
||||
CMAKE_ARGS+= -DWITHOUT_OQGRAPH=1
|
||||
PLIST_SUB+= OQGRAPH="@comment "
|
||||
. else
|
||||
USE_GCC?= yes
|
||||
CMAKE_ARGS+= -DWITH_OQGRAPH_STORAGE_ENGINE=1
|
||||
PLIST_SUB+= OQGRAPH=""
|
||||
LIB_DEPENDS+= libboost_system.so:${PORTSDIR}/devel/boost-libs
|
||||
. endif
|
||||
. if ${PORT_OPTIONS:MMAXKEY}
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-include_my_compare.h
|
||||
. endif
|
||||
INNODB_CMAKE_OFF= -DWITHOUT_INNOBASE=1
|
||||
MAXKEY_EXTRA_PATCHES+= ${FILESDIR}/extra-patch-include_my_compare.h
|
||||
MROONGA_CMAKE_OFF= -DWITHOUT_MROONGA=1
|
||||
MROONGA_USE= GCC=yes
|
||||
OQGRAPH_CMAKE_OFF= -DWITHOUT_OQGRAPH=1
|
||||
OQGRAPH_USE= GCC=yes
|
||||
OQGRAPH_LIB_DEPENDS= libboost_system.so:${PORTSDIR}/devel/boost-libs
|
||||
|
||||
post-install:
|
||||
# Remove programs to avoid conflict with mariadb100-client
|
||||
@ -162,6 +119,19 @@ post-install:
|
||||
${STAGEDIR}${PREFIX}/bin/mysqlaccess
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000012
|
||||
CMAKE_ARGS+= -DWITH_JEMALLOC="system"
|
||||
.else
|
||||
CMAKE_ARGS+= -DWITH_JEMALLOC="no"
|
||||
.endif
|
||||
|
||||
# Server segfaults on i386 when built with clang >= 3.4
|
||||
.if ${ARCH} == 'i386' && ${OSVERSION} >= 1001000
|
||||
USE_GCC= yes
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} 's/*.1/${MAN1}/' ${WRKSRC}/man/CMakeLists.txt
|
||||
@${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/mysys/my_default.c
|
||||
@ -172,4 +142,4 @@ post-patch:
|
||||
${MV} ${WRKSRC}/storage/tokudb ${WRKSRC}/skip-tokudb
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user