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

PortSystem          1.0
PortGroup           github 1.0
PortGroup           makefile 1.0

github.setup        davidesantangelo krep 1.1.2 v
github.tarball_from archive
revision            0

homepage            https://davidesantangelo.github.io/krep/

description         A High-Performance String Search Utility

long_description    \
    ${name} is a blazingly fast string search utility designed for \
    performance-critical applications. It implements multiple optimized \
    search algorithms and leverages modern hardware capabilities to deliver \
    maximum throughput.

checksums           rmd160  b58f4796a58202bab741225139714c78688ab6cc \
                    sha256  99f17d33577861cb2d445345b159652f7f32bbb7d070314ca685d4ced74f2a81 \
                    size    99100

categories          textproc
installs_libs       no
license             BSD
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

build.args-append   ENABLE_ARCH_DETECTION=0

compiler.c_standard 2011

patch {
    reinplace -E {s|CC =|CC ?=|g}           ${worksrcpath}/Makefile
    reinplace -E {s|CFLAGS =|CFLAGS ?=|g}   ${worksrcpath}/Makefile
    reinplace -E {s|LDFLAGS =|LDFLAGS ?=|g} ${worksrcpath}/Makefile
}

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
}
