Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-libs/actor-framework: New package #14255

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions dev-libs/actor-framework/Manifest
@@ -0,0 +1 @@
DIST actor-framework-0.17.3.tar.gz 2678220 BLAKE2B 35bf8e03431b67748417ffb5e6a67c25ae6ee42f049df86b7699541359045990522ea89eb6b5dfe30c5fec5169c64cddc3338087cb60e950ff2bce55c8e6b715 SHA512 55b05d0f890bf3e690db3bf17f5716fd764f0b210acc104d88c4807e2923ef3592a56c0625765070a15e5723951893897b813288aaf00bc8d7b39175d4e0305a
110 changes: 110 additions & 0 deletions dev-libs/actor-framework/actor-framework-0.17.3.ebuild
@@ -0,0 +1,110 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{6,7,8} )
inherit cmake-multilib python-single-r1

DESCRIPTION="The C++ Actor Framework (CAF)"
HOMEPAGE="https://actor-framework.org/"
SRC_URI="https://github.com/actor-framework/actor-framework/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="|| ( Boost-1.0 BSD )"
SLOT="0/17.3"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc examples opencl +openssl python static-libs test tools"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="examples? ( net-misc/curl[${MULTILIB_USEDEP}] )
openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP},static-libs?] )
opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
python? ( ${PYTHON_DEPS}
dev-python/ipython
dev-python/pybind11[${PYTHON_USEDEP}] )"

DEPEND="${RDEPEND}"

BDEPEND="doc? ( app-doc/doxygen[dot]
app-shells/bash:0
dev-texlive/texlive-fontsextra
dev-texlive/texlive-latex
dev-texlive/texlive-latexextra )"

RESTRICT="!test? ( test )"

src_prepare() {
append-cflags "-std=c++11 -Wextra -Wall -pedantic"
append-cxxflags "-std=c++11 -Wextra -Wall -pedantic"

rm -rf libcaf_python/third_party || die

if use python; then
sed -i 's:.*/third_party/pybind/.*:if(FALSE):' \
libcaf_python/CMakeLists.txt || die
sed -i 's:.*pybind11/pybind11.h"$:#include "pybind11/pybind11.h":' \
libcaf_python/src/main.cpp || die
fi

cmake-utils_src_prepare
}

multilib_src_configure() {
if multilib_is_native_abi && use python; then
local no_python=no
else
local no_python=yes
fi
local mycmakeargs=(
-DCAF_BUILD_STATIC=$(usex static-libs)
-DCAF_BUILD_TEX_MANUAL=$(usex doc)
-DCAF_ENABLE_ADDRESS_SANITIZER=$(usex debug)
-DCAF_ENABLE_RUNTIME_CHECKS=$(usex debug)
-DCAF_LOG_LEVEL=$(usex debug DEBUG QUIET)
-DCAF_NO_EXAMPLES=$(usex examples no yes)
-DCAF_NO_OPENCL=$(usex opencl no yes)
-DCAF_NO_OPENSSL=$(usex openssl no yes)
-DCAF_NO_PYTHON=${no_python}
-DCAF_NO_TOOLS=$(usex tools no yes)
-DCAF_NO_UNIT_TESTS=$(usex test no yes)
-DCMAKE_SKIP_RPATH=yes
-DLIBRARY_OUTPUT_PATH="$(get_libdir)"
)

cmake-utils_src_configure
}

multilib_src_compile() {
cmake-utils_src_compile

use doc && cmake-utils_src_make doxygen manual
}

multilib_src_test() {
if multilib_is_native_abi; then
local libdir="$(get_libdir)"
local libs="${BUILD_DIR}/libcaf_core/${libdir}"
libs="${libs}:${BUILD_DIR}/libcaf_io/${libdir}"

use opencl && libs="${libs}:${BUILD_DIR}/libcaf_opencl/${libdir}"
use openssl && libs="${libs}:${BUILD_DIR}/libcaf_openssl/${libdir}"
use python && libs="${libs}:${BUILD_DIR}/libcaf_python/${libdir}"

einfo "LD_LIBRARY_PATH is set to ${libs}"
LD_LIBRARY_PATH="${libs}" cmake-utils_src_test
fi
}

multilib_src_install() {
cmake-utils_src_install

if multilib_is_native_abi; then
dobin bin/*
if use doc ; then
dodoc -r "${BUILD_DIR}"/doc/pdf
dodoc -r "${BUILD_DIR}"/doc/html
docinto pdf
dodoc "${BUILD_DIR}"/doc/manual.pdf
fi
fi
}
20 changes: 20 additions & 0 deletions dev-libs/actor-framework/metadata.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<use>
<flag name="debug">Raises log-level to DEBUG, enables runtime checks and address sanitizer</flag>
<flag name="doc">Compiles and installs the documentation as PDF and HTML</flag>
<flag name="examples">Compiles and installs the provided example binaries and sources</flag>
<flag name="opencl">Compiles against the provided opencl implementation</flag>
<flag name="openssl">Use dev-libs/openssl to provide support communication over TLS</flag>
<flag name="test">Builds the provided unit tests</flag>
<flag name="tools">Builds caf-run and caf-vec tools</flag>
</use>
<upstream>
<remote-id type="github">actor-framework/actor-framework</remote-id>
</upstream>
<longdescription lang="en">
An implementation of the Actor Model of distributed computation in C++.
</longdescription>
</pkgmetadata>