summaryrefslogtreecommitdiff
path: root/dev-lang/swi-prolog
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/swi-prolog')
-rw-r--r--dev-lang/swi-prolog/Manifest2
-rw-r--r--dev-lang/swi-prolog/swi-prolog-9.3.9.ebuild184
2 files changed, 186 insertions, 0 deletions
diff --git a/dev-lang/swi-prolog/Manifest b/dev-lang/swi-prolog/Manifest
index bbd7e8f1dfea..24a564a0e574 100644
--- a/dev-lang/swi-prolog/Manifest
+++ b/dev-lang/swi-prolog/Manifest
@@ -1,4 +1,6 @@
AUX swi-prolog-9.1.2-configure-clang16.patch 2605 BLAKE2B c0e547c31c5d613659d92cebd66a1a67ce12fe97f8609116eccc294e5515170521a7c266a88655040da75e126b7314ea7a05f7d35e5d30e010e8df0998fe6945 SHA512 6863b15a7e9aa313ef06a98a6a3a8e4a5c494684c212ba8995a7995e07d1679b7d8b5b0a271209344cd6a858d4a65e462083e9e450396017148c0ee220c89fc0
DIST swipl-9.1.2.tar.gz 11827220 BLAKE2B e4bf40d1b4d0c48af5e630728208ca849b9a3d0f4129c827b98cd8d666b934218bbbee4c357b67cdd72b9e15046b70a873ffd9e31eaacac620a9aba6a7aec7fd SHA512 d47375c21ed33a2822b9df294a709141fc2e1f0aa61a297bd51a504f6f7859a1deb0ea6705d30b6f8198c71f440b176c7259bd83bff1ac5393ced77fdfbf564a
+DIST swipl-9.3.9.tar.gz 12302913 BLAKE2B fb657c58673a250a5a0563a2efd164b491eba15402c4442a0751f2fd3dd176337fc3f8eac828014c8341b852b6546a56c755fa0488daf211329bc8ff02fb67a5 SHA512 6e7247871b6379801b52df7da22d808dd823bc3f42ec1212bd3c3f61d0363dc05135ab389ea08143b99a8b3b356bfed52a749a32a45bb434d8aa6e3514c521b9
EBUILD swi-prolog-9.1.2-r1.ebuild 4047 BLAKE2B c1417db7aff1db4cb7116e2666044f70f5541c62dd8efd4e36bb9511fe90b8458a63121faf4754e74ded44a8f9cf606539d6c4a197d36f1296dbb5414231f9fc SHA512 8e80345d293a98d55c80062a77931014f268e43be371c9136adb7a44aeff027d4f143f3fadf976332805403ba3424d204e998e55b2b88069e1522cb80df29f31
+EBUILD swi-prolog-9.3.9.ebuild 4102 BLAKE2B bdbe82060df37289c1187cdccad031c9e7ec602c9082364b5db054a1bdff3a75e17b4ae04c03705ef0436a441918e3517adc8bf99e32a0063801dbeb86af0eec SHA512 dd26cce63ebcea70dd6c51d2e193691ca19396c0b53558af9c74950a6dcbe3deed38756caf585220cf02396b8efdf186673cbcef6d8c6a8107daf834ef03e812
MISC metadata.xml 739 BLAKE2B d9bdefa945afd5752828f5e0e4edcbc15bf7db4bd1c68133c5011cf2b416a1511be1f58a2fd69cc55b0f4ee68efa8c7ec65200e2714f0381a02b75096dc31460 SHA512 7ea63958dd18ad3c8b9fa9a3511706f63e00c21249e39fcb47de57d539bffbebf640a9c48b1764f89caacedb267e24dea1f94cf792a66ba6bf9c5d10460c2f75
diff --git a/dev-lang/swi-prolog/swi-prolog-9.3.9.ebuild b/dev-lang/swi-prolog/swi-prolog-9.3.9.ebuild
new file mode 100644
index 000000000000..f2edfed3417b
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-9.3.9.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P="swipl-${PV}"
+PATCHSET_VER="0"
+
+inherit cmake desktop flag-o-matic java-pkg-opt-2 toolchain-funcs xdg
+
+DESCRIPTION="Versatile implementation of the Prolog programming language"
+HOMEPAGE="https://www.swi-prolog.org/"
+
+if [[ "${PV}" == *9999* ]] ; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/SWI-Prolog/swipl-devel.git"
+else
+ SRC_URI="https://www.swi-prolog.org/download/devel/src/${MY_P}.tar.gz"
+ S="${WORKDIR}/${MY_P}"
+
+ KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="X archive berkdb +cli debug doc +gmp gui +ipc java minimal odbc pcre pgo qt6 ssl test yaml"
+RESTRICT="!test? ( test )"
+
+# See cmake/PackageSelection.cmake and cmake/DocDepends.cmake
+REQUIRED_USE="
+ doc? ( archive )
+ minimal? ( !archive !doc !ipc !ssl !test )
+"
+
+COMMON_DEPEND="
+ sys-libs/ncurses:=
+ sys-libs/zlib:=
+ virtual/libcrypt:=
+ X? (
+ media-libs/freetype:2
+ media-libs/fontconfig:1.0
+ media-libs/libjpeg-turbo:=
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXinerama
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+ archive? ( app-arch/libarchive:= )
+ berkdb? ( >=sys-libs/db-4:= )
+ cli? (
+ dev-libs/libedit
+ sys-libs/readline:=
+ )
+ gmp? ( dev-libs/gmp:0= )
+ gui? (
+ !qt6? (
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+ qt6? ( dev-qt/qtbase:6[gui,widgets] )
+ )
+ !minimal? ( dev-libs/ossp-uuid )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ ssl? ( dev-libs/openssl:0= )
+ yaml? ( dev-libs/libyaml )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.8:* )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ X? ( x11-base/xorg-proto )
+ java? (
+ >=virtual/jdk-1.8:*
+ test? ( dev-java/junit:4 )
+ )
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ eapply "${WORKDIR}"/${PV}
+ fi
+
+ sed \
+ -e "s|\(SWIPL_INSTALL_PREFIX\) lib/.*)|\1 $(get_libdir)/swipl)|" \
+ -e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1 $(get_libdir)/|" \
+ -i CMakeLists.txt || die
+
+ sed "s/ -Werror//g" \
+ -i cmake/GCCBuiltins.cmake \
+ -i cmake/Config.cmake \
+ -i packages/ssl/CMakeLists.txt || die
+
+ local ncurses_lib_flags=$($(tc-getPKG_CONFIG) --libs ncurses)
+ sed -i "/project(SWI-Prolog)/a set(CMAKE_REQUIRED_LIBRARIES \${CMAKE_REQUIRED_LIBRARIES} ${ncurses_lib_flags})" CMakeLists.txt || die
+ sed -i "s:\${CURSES_LIBRARIES}:${ncurses_lib_flags}:" src/CMakeLists.txt || die
+
+ java-pkg-opt-2_src_prepare
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Lots of UB, see https://gcc.gnu.org/PR113521
+ filter-lto
+ append-flags -fno-strict-aliasing
+ use debug && append-flags -DO_DEBUG
+
+ if use pgo; then
+ CMAKE_BUILD_TYPE="PGO"
+ append-flags -Wno-error=coverage-mismatch
+ fi
+
+ local mycmakeargs=(
+ -DBUILD_TESTING=$(usex test)
+ -DINSTALL_DOCUMENTATION=$(usex doc)
+ -DSWIPL_INSTALL_PREFIX=$(get_libdir)/swipl
+ -DSWIPL_PACKAGES_ARCHIVE=$(usex archive)
+ -DSWIPL_PACKAGES_BASIC=$(usex !minimal)
+ -DSWIPL_PACKAGES_BDB=$(usex berkdb)
+ -DSWIPL_PACKAGES_JAVA=$(usex java)
+ -DSWIPL_PACKAGES_ODBC=$(usex odbc)
+ -DSWIPL_PACKAGES_PCRE=$(usex pcre)
+ -DSWIPL_PACKAGES_SSL=$(usex ssl)
+ -DSWIPL_PACKAGES_TERM=$(usex cli)
+ -DSWIPL_PACKAGES_TIPC=$(usex ipc)
+ -DSWIPL_PACKAGES_X=$(usex X)
+ -DSWIPL_PACKAGES_YAML=$(usex yaml)
+ -DUSE_GMP=$(usex gmp)
+ -DUSE_TCMALLOC=OFF
+ )
+
+ if use gui; then
+ mycmakeargs+=(
+ -DSWIPL_PACKAGES_QT=yes
+ $(cmake_use_find_package qt6 Qt6)
+ )
+ else
+ mycmakeargs+=( -DSWIPL_PACKAGES_QT=no )
+ fi
+
+ if use test && use java; then
+ mycmakeargs+=( -DJUNIT_JAR="${ESYSROOT}"/usr/share/junit-4/lib/junit.jar )
+ fi
+
+ export XDG_CONFIG_DIRS="${HOME}"
+ export XDG_DATA_DIRS="${HOME}"
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ if use gui; then
+ doicon "${S}"/snap/gui/swipl.png
+ make_desktop_entry swipl-win "SWI-Prolog" swipl "Development"
+ fi
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+ use gui && xdg_pkg_preinst
+}
+
+pkg_postinst() {
+ use gui && xdg_pkg_postinst
+}
+
+pkg_postrm() {
+ use gui && xdg_pkg_postrm
+}