diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-11-30 02:29:04 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-11-30 02:56:26 +0100 |
commit | 62b4308736f01dcf55a2a58a53a2ef658bcaede1 (patch) | |
tree | f08838018028be302356390c0decdf3ef8993a83 /dev-lang | |
parent | sys-auth/libfprint: Call udev_reload (diff) | |
download | gentoo-62b4308736f01dcf55a2a58a53a2ef658bcaede1.tar.gz gentoo-62b4308736f01dcf55a2a58a53a2ef658bcaede1.tar.bz2 gentoo-62b4308736f01dcf55a2a58a53a2ef658bcaede1.zip |
dev-lang/souffle: new package; add 2.4.1
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/souffle/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/souffle/files/souffle-2.4.1-ncurses.patch | 13 | ||||
-rw-r--r-- | dev-lang/souffle/metadata.xml | 22 | ||||
-rw-r--r-- | dev-lang/souffle/souffle-2.4.1.ebuild | 123 |
4 files changed, 159 insertions, 0 deletions
diff --git a/dev-lang/souffle/Manifest b/dev-lang/souffle/Manifest new file mode 100644 index 000000000000..5be2a57dc07a --- /dev/null +++ b/dev-lang/souffle/Manifest @@ -0,0 +1 @@ +DIST souffle-2.4.1.tar.gz 9668253 BLAKE2B b101a6f24df7d5bd86854d5d19c166bfe8266a9f6e8c8391fdbb79afddec7bd2297bb7af472ebc01ff2d6b0c1516820d96ec47dbf1042167b1435c22f9671ea3 SHA512 5dd321a2b025f2120d7867fa7317b4784a0f0fcc109250721cdb0918009ca218c63cdad004282046885f7096b287bc111e09057311603828ecce53f9cc532319 diff --git a/dev-lang/souffle/files/souffle-2.4.1-ncurses.patch b/dev-lang/souffle/files/souffle-2.4.1-ncurses.patch new file mode 100644 index 000000000000..96882d9f29da --- /dev/null +++ b/dev-lang/souffle/files/souffle-2.4.1-ncurses.patch @@ -0,0 +1,13 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -288,8 +288,8 @@ endif() + if (SOUFFLE_USE_CURSES) + target_compile_definitions(libsouffle PUBLIC USE_NCURSES) + target_compile_definitions(compiled PUBLIC USE_NCURSES) +- target_link_libraries(libsouffle PUBLIC Curses::NCurses) +- target_link_libraries(compiled PUBLIC Curses::NCurses) ++ target_link_libraries(libsouffle PUBLIC ${CURSES_LIBRARIES}) ++ target_link_libraries(compiled PUBLIC ${CURSES_LIBRARIES}) + endif() + + if (SOUFFLE_USE_ZLIB) diff --git a/dev-lang/souffle/metadata.xml b/dev-lang/souffle/metadata.xml new file mode 100644 index 000000000000..b76f2d6201e7 --- /dev/null +++ b/dev-lang/souffle/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> + +<pkgmetadata> + <maintainer type="person"> + <email>xgqt@gentoo.org</email> + <name>Maciej Barć</name> + </maintainer> + <longdescription> + Soufflé is a variant of Datalog for tool designers crafting analyses in + Horn clauses. Soufflé synthesizes a native parallel C++ program from a + logic specification. + </longdescription> + <use> + <flag name="ffi">Support c++ functors with arbitrary number of arguments</flag> + <flag name="swig">Enable SWIG usage, needed for Java and Python bindings</flag> + </use> + <upstream> + <bugs-to>https://github.com/souffle-lang/souffle/issues/</bugs-to> + <remote-id type="github">souffle-lang/souffle</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-lang/souffle/souffle-2.4.1.ebuild b/dev-lang/souffle/souffle-2.4.1.ebuild new file mode 100644 index 000000000000..5bf3f618cb58 --- /dev/null +++ b/dev-lang/souffle/souffle-2.4.1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit bash-completion-r1 cmake java-pkg-opt-2 python-single-r1 + +DESCRIPTION="Datalog compiler, synthesizes C++ program from logic specification" +HOMEPAGE="http://souffle-lang.github.io/ + https://github.com/souffle-lang/souffle/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/souffle-lang/${PN}.git" +else + SRC_URI="https://github.com/souffle-lang/${PN}/archive/${PV}.tar.gz + -> ${P}.tar.gz" + + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="UPL-1.0" +SLOT="0" +IUSE="+ffi java +ncurses +openmp python +sqlite swig test +zlib" +REQUIRED_USE="java? ( swig ) python? ( swig ) test? ( ${PYTHON_REQUIRED_USE} )" + +# Still, some tests fail. TODO: Disable them. +# RESTRICT="!test? ( test )" +RESTRICT="test" + +RDEPEND=" + ffi? ( dev-libs/libffi:= ) + ncurses? ( sys-libs/ncurses:= ) + openmp? ( sys-libs/libomp:= ) + python? ( ${PYTHON_DEPS} ) + sqlite? ( dev-db/sqlite:3 ) + swig? ( dev-lang/swig:= ) + zlib? ( sys-libs/zlib:= ) +" +DEPEND=" + ${RDEPEND} + java? ( >=virtual/jdk-1.8 ) +" +BDEPEND=" + sys-devel/bison + sys-devel/flex + test? ( ${PYTHON_DEPS} ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.4.1-ncurses.patch" +) + +pkg_pretend() { + if [[ "${MERGE_TYPE}" != binary ]] ; then + if has ccache "${FEATURES}" && use test ; then + ewarn "Very many tests fail with ccache enabled." + fi + fi +} + +pkg_setup() { + if use java ; then + java-pkg-opt-2_pkg_setup + fi + + if use python || use test ; then + python-single-r1_pkg_setup + fi +} + +src_prepare() { + unset LEX + + cmake_src_prepare + java-pkg-opt-2_src_prepare +} + +src_configure() { + local -a mycmakeargs=( + # Configure bash completions. + -DBASH_COMPLETION_COMPLETIONSDIR=$(get_bashcompdir) + -DSOUFFLE_BASH_COMPLETION=ON + + # Disable developer tests. + -DSOUFFLE_TEST_EVALUATION=OFF + -DSOUFFLE_TEST_EXAMPLES=OFF + + -DSOUFFLE_ENABLE_TESTING=$(usex test) + -DSOUFFLE_SWIG_JAVA=$(usex java) + -DSOUFFLE_SWIG_PYTHON=$(usex python) + -DSOUFFLE_USE_CURSES=$(usex ncurses) + -DSOUFFLE_USE_LIBFFI=$(usex ffi) + -DSOUFFLE_USE_OPENMP=$(usex openmp) + -DSOUFFLE_USE_SQLITE=$(usex sqlite) + -DSOUFFLE_USE_ZLIB=$(usex zlib) + ) + + # Version information for non-git, non-live builds. + if ! has live "${PROPERTIES}" ; then + mycmakeargs+=( + -DSOUFFLE_GIT=OFF + -DSOUFFLE_VERSION="${PV}" + ) + fi + + if use ffi ; then + mycmakeargs+=( + -DLIBFFI_INCLUDE_DIR="${EPREFIX}/usr/$(get_libdir)/libffi/include" + ) + fi + + cmake_src_configure +} + +src_install() { + cmake_src_install + + doman man/*.1 +} |