pantry/projects/mysql.com/package.yml
Jacob Heider 747c59e1a3
fix(mysql) (#6058)
* fix(mysql)

closes #6023

* audit fix
2024-05-03 20:47:55 -04:00

143 lines
4.2 KiB
YAML

distributable:
- url: https://cdn.mysql.com/Downloads/MySQL-{{version.marketing}}/mysql-boost-{{version}}.tar.gz
strip-components: 1
# 8.4.0 doesn't provide a boost option
- url: https://cdn.mysql.com/Downloads/MySQL-{{version.marketing}}/mysql-{{version}}.tar.gz
strip-components: 1
versions:
github: mysql/mysql-server/tags
strip: /^mysql-/
dependencies:
unicode.org: ^71
libevent.org: ^2
lz4.org: ^1
openssl.org: ^1.1
protobuf.dev: ^21
zlib.net: ^1.2
facebook.com/zstd: ^1
curl.se: '>=6.0'
thrysoee.dk/editline: ^3
developers.yubico.com/libfido2: ^1
linux:
# llvm cannot find #include <bit>
# use our libstdc++ instead
gnu.org/gcc: '*'
build:
dependencies:
cmake.org: ^3
freedesktop.org/pkg-config: ^0.29
gnu.org/bison: '>=3.0.4'
working-directory: build
script:
# https://www.mail-archive.com/ports@freebsd.org/msg00418.html
# And they *force* it on
- sed -i -e 's/\(STRING_APPEND.*moutline-atomics.*\)/# \1/' ../CMakeLists.txt
# FIXME: starting with 8.0.33, mysql reports:
# -- Found ZLIB: /Users/jacob/.pkgx/zlib.net/v1.2.13/lib/libz.dylib (found version "1.2.13")
# CMake Error at cmake/zlib.cmake:118 (MESSAGE):
# Cannot find system zlib libraries.
# Call Stack (most recent call first):
# CMakeLists.txt:1742 (MYSQL_CHECK_ZLIB)
- run: export ARGS="$(echo $ARGS | sed 's/WITH_ZLIB=system/WITH_ZLIB=bundled/g')"
if: '>=8.0.33<8.1'
- run: export ARGS="$ARGS -DCMAKE_C_STANDARD=17"
if: ^8.4
- cmake .. $ARGS
- make --jobs {{ hw.concurrency }} install
env:
ARGS:
- -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DCMAKE_BUILD_TYPE=Release
- -DFORCE_INSOURCE_BUILD=1
- -DCOMPILATION_COMMENT=pkgx
- -DINSTALL_DOCDIR=share/doc
- -DINSTALL_INCLUDEDIR=include
- -DINSTALL_INFODIR=share/info
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share
- -DINSTALL_PLUGINDIR=lib/plugin
- -DSYSCONFDIR=/etc
- -DWITH_SYSTEM_LIBS=ON
- -DWITH_EDITLINE=system
- -DWITH_ICU=system
- -DWITH_LIBEVENT=system
- -DWITH_LZ4=system
- -DWITH_PROTOBUF=system
- -DWITH_SSL=system
- -DWITH_ZLIB=system
- -DWITH_ZSTD=system
- -DWITH_UNIT_TESTS=OFF
- -DENABLED_LOCAL_INFILE=1
- -DWITH_INNODB_MEMCACHED=ON
- -DWITH_FIDO=system
#FIXME mysql requires boost=1.77
# which seems perfect for us right! Since we version independently
# however boost has only just started using github so its tags only
# go back to 1.82 lol. So we need to extend the version mechanism
# so that it can do both github and an array
- -DDOWNLOAD_BOOST=1
- -DWITH_BOOST=boost
# Now requires bison>=3.0.4
- -DBISON_EXECUTABLE={{deps.gnu.org/bison.prefix}}/bin/bison
linux/aarch64:
ARGS:
- -DCMAKE_CXX_FLAGS="-mno-outline-atomics"
- -DCMAKE_C_FLAGS="-mno-outline-atomics"
#^^ https://www.mail-archive.com/ports@freebsd.org/msg00418.html
provides:
- bin/mysql_client_test
- bin/my_print_defaults
- bin/myisam_ftdump
- bin/myisamchk
- bin/myisamlog
- bin/myisampack
- bin/mysql
- bin/mysql_config
- bin/mysql_config_editor
- bin/mysql_keyring_encryption_test
- bin/mysql_migrate_keyring
- bin/mysql_secure_installation
- bin/mysql_tzinfo_to_sql
- bin/mysqladmin
- bin/mysqlbinlog
- bin/mysqlcheck
- bin/mysqld
- bin/mysqld_multi
- bin/mysqld_safe
- bin/mysqldump
- bin/mysqldumpslow
- bin/mysqlimport
- bin/mysqlrouter
- bin/mysqlrouter_keyring
- bin/mysqlrouter_passwd
- bin/mysqlrouter_plugin_info
- bin/mysqlshow
- bin/mysqlslap
- bin/mysqltest
- bin/mysqltest_safe_process
- bin/mysqlxtest
test:
dependencies:
gnu.org/coreutils: ^9
pkgx.sh: ^1
script:
- mkdir -p mysql tmp
- mysqld --no-defaults --initialize-insecure --user=$USER --datadir=$PWD/mysql --tmpdir=$PWD/tmp
- PORT=$(pkgx get-port | tail -n1)
- mysqld --no-defaults --user=$USER --datadir=$PWD/mysql --port=$PORT --tmpdir=$PWD/tmp &
- sleep 5
- mysql --port=$PORT --user=root --password= --execute='show databases;'
- mysqladmin --port=$PORT --user=root --password= shutdown