summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-12-18 03:48:03 +0000
committerSam James <sam@gentoo.org>2022-12-18 04:01:27 +0000
commit8d5fa18ed281bdfa792b21c9d1d86cd2ff3642fc (patch)
tree136c0119e4029acb34acac7d44df01fe53136ad7 /sci-misc
parentsci-misc/lttoolbox: add 3.7.1 (diff)
downloadgentoo-8d5fa18ed281bdfa792b21c9d1d86cd2ff3642fc.tar.gz
gentoo-8d5fa18ed281bdfa792b21c9d1d86cd2ff3642fc.tar.bz2
gentoo-8d5fa18ed281bdfa792b21c9d1d86cd2ff3642fc.zip
sci-misc/apertium: add 3.8.3
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/apertium/Manifest1
-rw-r--r--sci-misc/apertium/apertium-3.8.3.ebuild65
-rw-r--r--sci-misc/apertium/files/apertium-3.8.3-bashism.patch30
3 files changed, 96 insertions, 0 deletions
diff --git a/sci-misc/apertium/Manifest b/sci-misc/apertium/Manifest
index 47013f1b728d..08af11ef434c 100644
--- a/sci-misc/apertium/Manifest
+++ b/sci-misc/apertium/Manifest
@@ -1 +1,2 @@
DIST apertium-3.2.0.tar.gz 767311 BLAKE2B 03069a0839d0ad61db12aea977e0847b3093a46becd7c36e3bb7b483242986f8f1b4a94c6c64bdfc94f11d13353fbdb6835ff032158d9a05151342606fdd57a1 SHA512 ec80d72480e414eb9a169241d0921b21009dde7c1da9a773f500f16ac785741be1f4a221c25b3b32e7847405f76e93b5feadb6f541170c0742718e27dfa1fb25
+DIST apertium-3.8.3.tar.bz2 560957 BLAKE2B c610395fb1e725ddc628a15b1234c434d174c5b5664ed8fa2d1480d438e143bcd194b6f5a2e79ede6fec0d4fa156be2b7725134727e2f976fe7ecd053a88c520 SHA512 78da8ffcc01706563c4e34c73355b3c65bc2b22abf1501169638b89eae95cd0a4bff095eef5488cba58d0e67b8dd7efd93759981ebd28a9115028e7ad75fa551
diff --git a/sci-misc/apertium/apertium-3.8.3.ebuild b/sci-misc/apertium/apertium-3.8.3.ebuild
new file mode 100644
index 000000000000..9a7357b9d220
--- /dev/null
+++ b/sci-misc/apertium/apertium-3.8.3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+inherit autotools python-any-r1
+
+DESCRIPTION="Shallow-transfer machine Translation engine and toolbox"
+HOMEPAGE="http://apertium.sourceforge.net/"
+SRC_URI="https://github.com/apertium/apertium/releases/download/v${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+# PKG_VERSION_ABI in configure.ac
+SLOT="0/3"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+# TODO: test_null_flush fails
+RESTRICT="!test? ( test ) test"
+
+RDEPEND="
+ dev-libs/icu:=
+ >=dev-libs/libxml2-2.6.17
+ dev-libs/utfcpp
+ >=sci-misc/lttoolbox-3.7.1:=
+ virtual/libiconv
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ ${PYTHON_DEPS}
+ dev-libs/libzip[tools]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.8.3-bashism.patch
+)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Requires shellcheck, not useful for us in Gentoo
+ cat <<-EOF > tests/sh/run || die
+ #!/usr/bin/env bash
+ exit 77
+ EOF
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-python-bindings
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/sci-misc/apertium/files/apertium-3.8.3-bashism.patch b/sci-misc/apertium/files/apertium-3.8.3-bashism.patch
new file mode 100644
index 000000000000..ca479d9cc134
--- /dev/null
+++ b/sci-misc/apertium/files/apertium-3.8.3-bashism.patch
@@ -0,0 +1,30 @@
+https://github.com/apertium/apertium/pull/181
+
+From 08578745ba3988ece9596eaca734d08e64bae4e1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 18 Dec 2022 03:39:58 +0000
+Subject: [PATCH] configure.ac: fix bashism
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+configure scripts need to be runnable with a POSIX-compliant /bin/sh.
+
+On many (but not all!) systems, /bin/sh is provided by Bash, so errors
+like this aren't spotted. Notably Debian defaults to /bin/sh provided
+by dash which doesn't tolerate such bashisms as '=='.
+
+This retains compatibility with bash.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -95,7 +95,7 @@ for version in 23 2b 20 2a 17; do
+ version_flag="-std=c++${version}"
+ AX_CHECK_COMPILE_FLAG([${version_flag}], [break], [version_flag=none])
+ done
+-AS_IF([test "$version_flag" == none], [
++AS_IF([test "$version_flag" = none], [
+ AC_MSG_ERROR([Could not enable at least C++17 - upgrade your compiler])
+ ])
+ CXXFLAGS="$CXXFLAGS ${version_flag}"