# -*- 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
PortGroup           cmake 1.1

github.setup        uxlfoundation oneDPL 2022.11.1 oneDPL- -release
name                onedpl
revision            0

categories          devel parallel
platforms           any
license             Apache-2
supported_archs     noarch

maintainers         {makr @mohd-akram} openmaintainer

description         oneAPI DPC++ Library
long_description    oneAPI DPC++ Library (oneDPL) provides high-productivity \
                    APIs to developers, which can minimize Data Parallel C++ \
                    (DPC++) programming efforts across devices for high \
                    performance parallel applications.

homepage            https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-library.html

github.tarball_from archive

checksums           rmd160  343a2351a6bd88273167cee42d11cd92d1e4c7f9 \
                    sha256  eb0e5a3474b8bb8278266163dd3674b10dcb1471bf64529ad2c7ac6a49146495 \
                    size    25182644

depends_lib         port:onetbb

# The compiler feature "cxx_std_17" is not known to CXX compiler
compiler.cxx_standard   2017

post-patch {
    reinplace "s|\${OUTPUT_DIR}|\$ENV{DESTDIR}\${OUTPUT_DIR}|g" \
        ${worksrcpath}/cmake/scripts/generate_config.cmake
}

post-destroot {
    move ${destroot}${prefix}/lib/cmake/oneDPL/dpl.pc \
        ${destroot}${prefix}/lib/pkgconfig/
}
