Lines 2-13
Link Here
|
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= mysql |
4 |
PORTNAME= mysql |
5 |
PORTVERSION= 5.7.10 |
5 |
PORTVERSION= 5.7.12 |
6 |
PORTREVISION?= 4 |
|
|
7 |
CATEGORIES= databases ipv6 |
6 |
CATEGORIES= databases ipv6 |
8 |
MASTER_SITES= MYSQL/MySQL-5.7:MySQL SF/boost/boost/1.59.0:boost |
7 |
MASTER_SITES= MYSQL/MySQL-5.7 |
9 |
PKGNAMESUFFIX?= 57-server |
8 |
PKGNAMESUFFIX?= 57-server |
10 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:MySQL boost_1_59_0.tar.gz:boost |
9 |
DISTNAME= ${PORTNAME}-boost-${PORTVERSION} |
11 |
|
10 |
|
12 |
MAINTAINER= mokhi64@gmail.com |
11 |
MAINTAINER= mokhi64@gmail.com |
13 |
COMMENT= Multithreaded SQL database (server) |
12 |
COMMENT= Multithreaded SQL database (server) |
Lines 14-48
Link Here
|
14 |
|
13 |
|
15 |
LICENSE= GPLv2 |
14 |
LICENSE= GPLv2 |
16 |
|
15 |
|
|
|
16 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
17 |
|
17 |
SLAVEDIRS= databases/mysql57-client |
18 |
SLAVEDIRS= databases/mysql57-client |
18 |
USES= cmake:outsource shebangfix |
19 |
USES= bison:build cmake:outsource compiler:c11 compiler:c++11-lib cpe libedit perl5 shebangfix |
19 |
|
20 |
|
20 |
OPTIONS_RADIO= SSL |
21 |
USE_OPENSSL= yes |
21 |
OPTIONS_RADIO_SSL= BUNDLED_SSL OPENSSL WITHOUT_SSL |
22 |
USE_PERL5= run |
22 |
OPTIONS_DEFAULT+= OPENSSL |
|
|
23 |
NO_OPTIONS_SORT= yes |
24 |
|
23 |
|
25 |
BUNDLED_SSL_DESC= SSL/TLS support via (bundled) CyaSSL |
24 |
MY_DBDIR= /var/db/mysql |
26 |
WITHOUT_SSL_DESC= No SSL/TLS support |
25 |
MY_SECDIR= /var/db/mysql_secure |
|
|
26 |
MY_TMPDIR= /var/db/mysql_tmpdir |
27 |
|
27 |
|
28 |
CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mysql" \ |
28 |
LIB_DEPENDS+= libevent.so:${PORTSDIR}/devel/libevent2 \ |
|
|
29 |
liblz4.so:${PORTSDIR}/archivers/liblz4 |
30 |
|
31 |
CMAKE_BUILD_TYPE= Release |
32 |
|
33 |
CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \ |
34 |
-DINSTALL_LDCONFIGDIR="${LOCALBASE}/libdata/ldconfig" \ |
35 |
-DINSTALL_PKGCONFIGDIR="${LOCALBASE}/libdata/pkgconfig" \ |
36 |
-DINSTALL_DOCDIR="share/doc/mysql" \ |
29 |
-DINSTALL_DOCREADMEDIR="share/doc/mysql" \ |
37 |
-DINSTALL_DOCREADMEDIR="share/doc/mysql" \ |
30 |
-DINSTALL_INCLUDEDIR="include/mysql" \ |
38 |
-DINSTALL_INCLUDEDIR="include/mysql" \ |
31 |
-DINSTALL_INFODIR="info" \ |
39 |
-DINSTALL_INFODIR="info" \ |
32 |
-DINSTALL_LIBDIR="lib/mysql" \ |
40 |
-DINSTALL_LIBDIR="lib/mysql" \ |
33 |
-DINSTALL_PKGCONFIGDIR=${PREFIX}/libdata/pkgconfig \ |
|
|
34 |
-DINSTALL_MANDIR="man" \ |
41 |
-DINSTALL_MANDIR="man" \ |
35 |
-DINSTALL_MYSQLDATADIR="/var/db/mysql" \ |
42 |
-DINSTALL_MYSQLDATADIR="${MY_DBDIR}" \ |
|
|
43 |
-DINSTALL_MYSQLKEYRINGDIR="etc/mysql/keyring" \ |
36 |
-DINSTALL_MYSQLSHAREDIR="share/mysql" \ |
44 |
-DINSTALL_MYSQLSHAREDIR="share/mysql" \ |
37 |
-DINSTALL_MYSQLTESTDIR="share/mysql/tests" \ |
45 |
-DINSTALL_MYSQLTESTDIR="share/mysql/tests" \ |
38 |
-DINSTALL_PLUGINDIR="lib/mysql/plugin" \ |
46 |
-DINSTALL_PLUGINDIR="lib/mysql/plugin" \ |
39 |
-DINSTALL_SBINDIR="libexec" \ |
47 |
-DINSTALL_SBINDIR="libexec" \ |
40 |
-DINSTALL_SCRIPTDIR="bin" \ |
48 |
-DINSTALL_SCRIPTDIR="bin" \ |
|
|
49 |
-DINSTALL_SECURE_FILE_PRIVDIR="${MY_SECDIR}" \ |
41 |
-DINSTALL_SHAREDIR="share" \ |
50 |
-DINSTALL_SHAREDIR="share" \ |
42 |
-DINSTALL_SUPPORTFILESDIR="share/mysql" \ |
51 |
-DINSTALL_SUPPORTFILESDIR="share/mysql" \ |
43 |
-DLOCAL_BOOST_DIR=${WRKDIR}/boost_1_59_0 \ |
52 |
-DMYSQL_KEYRINGDIR="${ETCDIR}/keyring" \ |
44 |
-DBOOST_INCLUDE_DIR=${WRKDIR}/boost_1_59_0 \ |
53 |
-DSYSCONFDIR="${ETCDIR}" \ |
45 |
-DWITH_INNODB_EXTRA_DEBUG=0 |
54 |
-DWITH_BOOST="${WRKSRC}/boost" \ |
|
|
55 |
-DWITH_EDITLINE=system \ |
56 |
-DWITH_LIBEVENT=system \ |
57 |
-DWITH_LZ4=system \ |
58 |
-DWITH_ZLIB=system \ |
59 |
-DWITH_PIC=1 |
46 |
|
60 |
|
47 |
SHEBANG_FILES= scripts/*.pl* scripts/*.sh |
61 |
SHEBANG_FILES= scripts/*.pl* scripts/*.sh |
48 |
|
62 |
|
Lines 50-73
Link Here
|
50 |
.error You have `USE_MYSQL' variable defined either in environment or in make(1) arguments. Please undefine and try again. |
64 |
.error You have `USE_MYSQL' variable defined either in environment or in make(1) arguments. Please undefine and try again. |
51 |
.endif |
65 |
.endif |
52 |
|
66 |
|
53 |
BUNDLED_SSL_CMAKE_ON= -DWITH_SSL=bundled |
67 |
SUB_LIST= MY_DBDIR=${MY_DBDIR} \ |
54 |
OPENSSL_USE= OPENSSL=yes |
68 |
MY_SECDIR=${MY_SECDIR} \ |
55 |
WITHOUT_SSL_CMAKE_ON= -DWITH_SSL=no |
69 |
MY_TMPDIR=${MY_TMPDIR} |
56 |
|
70 |
|
|
|
71 |
PLIST_SUB= MY_DBDIR=${MY_DBDIR} \ |
72 |
MY_SECDIR=${MY_SECDIR} \ |
73 |
MY_TMPDIR=${MY_TMPDIR} |
74 |
|
57 |
# MySQL-Server part |
75 |
# MySQL-Server part |
58 |
.if !defined(CLIENT_ONLY) |
76 |
.if !defined(CLIENT_ONLY) |
59 |
USE_MYSQL= yes |
77 |
USE_MYSQL= yes |
60 |
WANT_MYSQL_VER= 57 |
78 |
WANT_MYSQL_VER= 57 |
61 |
|
79 |
|
62 |
USES+= bison:build cpe perl5 |
80 |
CONFLICTS_INSTALL= mysql5[0-68-9]-server-* \ |
63 |
USE_PERL5= run |
81 |
mysql[0-46-9][0-9]-server-* \ |
|
|
82 |
mariadb[0-9][0-9]-server-* \ |
83 |
percona[0-9][0-9]-server-* |
64 |
|
84 |
|
65 |
CONFLICTS_INSTALL= mariadb[0-9]*-server-* \ |
|
|
66 |
mysql[0-46-9][0-689]-server-* \ |
67 |
percona[0-9]*-server-* |
68 |
|
69 |
USE_RC_SUBR= mysql-server |
85 |
USE_RC_SUBR= mysql-server |
70 |
|
86 |
|
|
|
87 |
SUB_FILES= my.cnf.sample |
88 |
|
71 |
USERS= mysql |
89 |
USERS= mysql |
72 |
GROUPS= mysql |
90 |
GROUPS= mysql |
73 |
|
91 |
|
Lines 110-131
Link Here
|
110 |
|
128 |
|
111 |
PERFSCHM_SUB_LIST+= PERFSCHEMRC="" |
129 |
PERFSCHM_SUB_LIST+= PERFSCHEMRC="" |
112 |
PERFSCHM_SUB_LIST_OFF+= PERFSCHEMRC="--skip-performance-schema" |
130 |
PERFSCHM_SUB_LIST_OFF+= PERFSCHEMRC="--skip-performance-schema" |
113 |
|
|
|
114 |
.else |
115 |
USES+= readline |
116 |
.endif |
131 |
.endif |
117 |
|
132 |
|
118 |
.include <bsd.port.pre.mk> |
133 |
.include <bsd.port.pre.mk> |
119 |
|
134 |
|
120 |
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 |
135 |
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 |
121 |
CC= clang |
136 |
# 'WITH_OPENSSL_PORT=yes' only can be used before "bsd.port.pre.mk" |
122 |
CXX= clang++ |
137 |
# Then, instead we use the woeks below |
123 |
CPP= clang-cpp |
138 |
OPENSSLBASE= ${LOCALBASE} |
124 |
OPENSSL_CMAKE_ON= -DWITH_SSL=system |
139 |
OPENSSL_PORT?= security/openssl |
125 |
.elif ${OSVERSION} >= 1000000 |
140 |
OPENSSL_SHLIBVER?= 8 |
126 |
OPENSSL_CMAKE_ON= -DWITH_SSL=yes |
141 |
|
|
|
142 |
OPENSSLDIR?= ${OPENSSLBASE}/openssl |
143 |
BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${OPENSSL_PORT} |
144 |
RUN_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${OPENSSL_PORT} |
145 |
OPENSSLRPATH= ${LOCALBASE}/lib |
146 |
|
147 |
### Just for the sake of FreeBSD 9.X ### |
148 |
.if !defined(CLIENT_ONLY) |
149 |
EXTRA_PATCHES+= ${PATCHDIR}/rapid_plugin-patch-_x_mysqlxtest__src_mysqlxtest.cc |
127 |
.endif |
150 |
.endif |
|
|
151 |
.endif |
128 |
|
152 |
|
|
|
153 |
CMAKE_ARGS+= -DWITH_SSL=${OPENSSLBASE} |
154 |
|
129 |
post-extract: |
155 |
post-extract: |
130 |
@${RM} -rvf ${WRKSRC}/sql/sql_hints.yy.cc ${WRKSRC}/sql/sql_hints.yy.h |
156 |
@${RM} -rvf ${WRKSRC}/sql/sql_hints.yy.cc ${WRKSRC}/sql/sql_hints.yy.h |
131 |
|
157 |
|
Lines 132-135
Link Here
|
132 |
post-patch: |
158 |
post-patch: |
133 |
@${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt |
159 |
@${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt |
134 |
|
160 |
|
|
|
161 |
.if !defined(CLIENT_ONLY) |
162 |
post-install: |
163 |
${MKDIR} ${STAGEDIR}${ETCDIR} |
164 |
${INSTALL_DATA} ${WRKDIR}/my.cnf.sample ${STAGEDIR}${ETCDIR}/my.cnf.sample |
165 |
|
166 |
post-stage: |
167 |
${MKDIR} ${STAGEDIR}${ETCDIR}/keyring |
168 |
${MKDIR} ${STAGEDIR}${MY_SECDIR} |
169 |
${MKDIR} ${STAGEDIR}${MY_TMPDIR} |
170 |
.endif |
171 |
|
135 |
.include <bsd.port.post.mk> |
172 |
.include <bsd.port.post.mk> |