summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Vyalkova <cyber+gentoo@sysrq.in>2022-11-03 01:57:08 +0500
committerJoonas Niilola <juippis@gentoo.org>2023-01-08 10:36:23 +0200
commit1cfd89f3f0014c07593bd32a8824c6862f6465e3 (patch)
treec910ea140c85aca9802d9d39d075f2ca81d4a1eb /dev-lang/swi-prolog
parentdev-lang/swi-prolog: drop 8.4.2 (diff)
downloadgentoo-1cfd89f3f0014c07593bd32a8824c6862f6465e3.tar.gz
gentoo-1cfd89f3f0014c07593bd32a8824c6862f6465e3.tar.bz2
gentoo-1cfd89f3f0014c07593bd32a8824c6862f6465e3.zip
dev-lang/swi-prolog: add 9.1.2
Lots of changes! * EAPI 7 -> 8 * xdg-utils -> xdg * Improved constraints * Add REQUIRED_USE * New "ipc" USE flag (depends on !minimal) * Dropped "uuid" (part of !minimal now) * Follow Gentoo policy on Qt USE flags * Add PGO support * Add missing X deps * Bump JUnit dep * Fix -Werror Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in> Closes: https://github.com/gentoo/gentoo/pull/28115 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-lang/swi-prolog')
-rw-r--r--dev-lang/swi-prolog/Manifest1
-rw-r--r--dev-lang/swi-prolog/metadata.xml5
-rw-r--r--dev-lang/swi-prolog/swi-prolog-9.1.2.ebuild163
3 files changed, 168 insertions, 1 deletions
diff --git a/dev-lang/swi-prolog/Manifest b/dev-lang/swi-prolog/Manifest
index ae03b0fe8667..4b5c8af7d2c2 100644
--- a/dev-lang/swi-prolog/Manifest
+++ b/dev-lang/swi-prolog/Manifest
@@ -1,3 +1,4 @@
DIST swipl-8.4.1.tar.gz 11386908 BLAKE2B bd53355abe63ffde348ed38b0e7fee4bcba4e74128c73904a72ca3ba2021a8b650d08480a643ea3336f3fc6d1d7bcf7651deb1d32608581ce43bc118288df6da SHA512 22806d8abd0b729e27a6d7bbbd0df37af8af21bb186a8de58ec5f9a1d32c9a477838fd10155ff21998737fcc2aaf4711d1d4d5457ce5d62e328d5da032474ee5
DIST swipl-8.5.11.tar.gz 11480652 BLAKE2B eb812a272d3fbcb181c5cee0dd033f6b7ffdee467bf37c645a98a34ce455189ded7b7c678482e992918477160a6a585ea07dcc38a4aa123eb5f4e04a35dc20d0 SHA512 00387d25548198e0d738cc210a0769130a6ad6fb0596dec04539b1fb85ab8d660a73fec1fe5f5d01878b90e8736018dbb0c8cfd240e1d6b2b62c0bb892f0826c
DIST swipl-8.5.12.tar.gz 11489072 BLAKE2B 1c8ce7a0386c20be8e2eeac9d31df5862adf78ce0341e31b1ebcc42a923403c28707da12b88ba0773f5ebfdd61efe5a8d38a99f8f20aa47672fd51cdc4fbfb8e SHA512 d530fb7048cd80fa0f07b7b026279915cbb58dd7b8199daafe13c22659c5ffeac62168bcc9208c7bbd72616f54d453f5161c1fc08bf5497ba87abc12e5e8e7df
+DIST swipl-9.1.2.tar.gz 11827220 BLAKE2B e4bf40d1b4d0c48af5e630728208ca849b9a3d0f4129c827b98cd8d666b934218bbbee4c357b67cdd72b9e15046b70a873ffd9e31eaacac620a9aba6a7aec7fd SHA512 d47375c21ed33a2822b9df294a709141fc2e1f0aa61a297bd51a504f6f7859a1deb0ea6705d30b6f8198c71f440b176c7259bd83bff1ac5393ced77fdfbf564a
diff --git a/dev-lang/swi-prolog/metadata.xml b/dev-lang/swi-prolog/metadata.xml
index fb3da4793ad9..f346160e6877 100644
--- a/dev-lang/swi-prolog/metadata.xml
+++ b/dev-lang/swi-prolog/metadata.xml
@@ -7,7 +7,10 @@
</maintainer>
<use>
<flag name="archive">Use libarchive for extension packs</flag>
- <flag name="uuid">Use ossp-uuid for UUID pack</flag>
+ <flag name="cli" restrict="&gt;=dev-lang/swi-prolog-8.5.20">Add support for CLI interfaces based on readline and libedit</flag>
+ <flag name="ipc" restrict="&gt;=dev-lang/swi-prolog-8.5.20">Add support for TIPC inter-process communication</flag>
+ <flag name="pgo" restrict="&gt;=dev-lang/swi-prolog-8.5.20">Optimize the build using Profile Guided Optimization (PGO)</flag>
+ <flag name="uuid" restrict="&lt;dev-lang/swi-prolog-8.5.20">Use ossp-uuid for UUID pack</flag>
<flag name="yaml">Use libyaml for YAML pack</flag>
</use>
</pkgmetadata>
diff --git a/dev-lang/swi-prolog/swi-prolog-9.1.2.ebuild b/dev-lang/swi-prolog/swi-prolog-9.1.2.ebuild
new file mode 100644
index 000000000000..32072614c3f8
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-9.1.2.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake desktop flag-o-matic java-pkg-opt-2 toolchain-funcs xdg
+
+PATCHSET_VER="0"
+
+MY_P="swipl-${PV}"
+DESCRIPTION="Versatile implementation of the Prolog programming language"
+HOMEPAGE="https://www.swi-prolog.org/"
+SRC_URI="https://www.swi-prolog.org/download/devel/src/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+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() {
+ 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_QT=$(usex gui)
+ -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
+ $(cmake_use_find_package qt6 Qt6)
+ )
+
+ 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
+}