# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem              1.0
PortGroup               github 1.0

github.setup            akopytov sysbench 1.0.20
revision                0
categories              benchmarks
maintainers             {@sainnhe gmail.com:sainnhe} \
                        openmaintainer
license                 GPL-2+

description             Scriptable database and system performance benchmark

long_description \
    sysbench is a scriptable multi-threaded benchmark tool based on LuaJIT. It is \
    most frequently used for database benchmarks, but can also be used to create \
    arbitrarily complex workloads that do not involve a database server.

github.tarball_from     archive

checksums               rmd160  a345bf6f33bb41fe0e3d1aadaff0a798272ba537 \
                        sha256  e8ee79b1f399b2d167e6a90de52ccc90e52408f7ade1b9b7135727efe181347f \
                        size    1509630

use_autoreconf          yes
autoreconf.cmd          ./autogen.sh
autoreconf.args

# Override bad assumptions in autogen.sh by specifying which programs to use. The entire
# autogen.sh script has already been replaced by "autoreconf -vi" for the version after 1.0.x.
# https://github.com/akopytov/sysbench/commit/7af86b86193c4a53e9494498a8b58e04ab17a7bc
autoreconf.env          "ACLOCAL=${prefix}/bin/aclocal" \
                        "AUTOCONF=${prefix}/bin/autoconf" \
                        "AUTOHEADER=${prefix}/bin/autoheader" \
                        "AUTOMAKE=${prefix}/bin/automake" \
                        "LIBTOOLIZE=${prefix}/bin/glibtoolize"

depends_build-append    port:pkgconfig \
                        port:autoconf \
                        port:automake \
                        port:libtool

depends_lib             port:luajit \
                        port:umem

configure.checks.implicit_function_declaration.whitelist-append strchr

configure.args-append   --without-mysql \
                        --without-pgsql \
                        --with-system-luajit
