public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-misc/apertium/files/, sci-misc/apertium/
@ 2021-03-07 14:36 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2021-03-07 14:36 UTC (permalink / raw
  To: gentoo-commits

commit:     0d3c72be82f27867bf9c4b7b3506a5ce0ff32b15
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  7 14:36:14 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Mar  7 14:36:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d3c72be

sci-misc/apertium: Fix broken autotools

Closes: https://bugs.gentoo.org/595166
Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sci-misc/apertium/apertium-3.2.0.ebuild            |  5 +-
 .../apertium/files/apertium-3.2.0-autotools.patch  | 81 ++++++++++++++++++++++
 2 files changed, 84 insertions(+), 2 deletions(-)

diff --git a/sci-misc/apertium/apertium-3.2.0.ebuild b/sci-misc/apertium/apertium-3.2.0.ebuild
index 9f77d6c9025..997def4d182 100644
--- a/sci-misc/apertium/apertium-3.2.0.ebuild
+++ b/sci-misc/apertium/apertium-3.2.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -28,7 +28,8 @@ PATCHES=(
 	"${FILESDIR}"/${PV}-flags.patch
 	"${FILESDIR}"/${PV}-datadir.patch
 	"${FILESDIR}"/${P}-libpcre.patch
-	)
+	"${FILESDIR}"/${P}-autotools.patch
+)
 
 MAKEOPTS+=" -j1"
 AUTOTOOLS_IN_SOURCE_BUILD=1

diff --git a/sci-misc/apertium/files/apertium-3.2.0-autotools.patch b/sci-misc/apertium/files/apertium-3.2.0-autotools.patch
new file mode 100644
index 00000000000..4d3a91a795a
--- /dev/null
+++ b/sci-misc/apertium/files/apertium-3.2.0-autotools.patch
@@ -0,0 +1,81 @@
+--- a/apertium/Makefile.am
++++ b/apertium/Makefile.am
+@@ -78,7 +78,7 @@
+ 
+ apertium_pretransfer_SOURCES = apertium_pretransfer.cc
+ apertium_multiple_translations_SOURCES = apertium-multiple-translations.cc
+-apertium_multiple_translations_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_multiple_translations_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ apertium_destxt_SOURCES = apertium_destxt.cc
+ apertium_retxt_SOURCES = apertium_retxt.cc
+ apertium_deshtml_SOURCES = apertium_deshtml.cc
+@@ -99,45 +99,45 @@
+ apertium_remediawiki_SOURCES = apertium_remediawiki.cc
+ 
+ apertium_tagger_SOURCES = apertium_tagger.cc
+-apertium_tagger_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_tagger_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ apertium_tmxbuild_SOURCES = apertium_tmxbuild.cc
+-apertium_tmxbuild_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_tmxbuild_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ apertium_preprocess_transfer_SOURCES = transferpp.cc
+ apertium_preprocess_transfer_LDADD = $(APERTIUM_LIBS) \
+-                                     -lapertium$(GENERIC_MAJOR_VERSION)
++                                     libapertium3.la
+ 
+ apertium_filter_ambiguity_SOURCES = apertium_filter_ambiguity.cc
+ apertium_filter_ambiguity_LDADD = $(APERTIUM_LIBS) \
+-                                  -lapertium$(GENERIC_MAJOR_VERSION)
++                                  libapertium3.la
+ 
+ apertium_transfer_SOURCES = apertium_transfer.cc
+-apertium_transfer_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_transfer_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ apertium_interchunk_SOURCES = apertium_interchunk.cc
+-apertium_interchunk_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_interchunk_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ apertium_postchunk_SOURCES = apertium_postchunk.cc
+-apertium_postchunk_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_postchunk_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ apertium_lextor_SOURCES = apertium_lextor.cc
+-apertium_lextor_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_lextor_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ #apertium_lextor_eval_SOURCES = apertium-lextor-eval.C
+-#apertium_lextor_eval_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++#apertium_lextor_eval_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ apertium_tagger_apply_new_rules_SOURCES = apertium_tagger_apply_new_rules.cc
+-apertium_tagger_apply_new_rules_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_tagger_apply_new_rules_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ ###apertium_lextor_search_SOURCES = apertium-lextor-search.C
+-###apertium_lextor_search_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++###apertium_lextor_search_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ ###pruebas_lextor_SOURCES = pruebas-lextor.C
+-###pruebas_lextor_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++###pruebas_lextor_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ apertium_gen_wlist_lextor_translation_SOURCES = apertium_gen_wlist_lextor_translation.cc
+-apertium_gen_wlist_lextor_translation_LDADD = $(APERTIUM_LIBS) -lapertium$(GENERIC_MAJOR_VERSION)
++apertium_gen_wlist_lextor_translation_LDADD = $(APERTIUM_LIBS) libapertium3.la
+ 
+ INCLUDES = -I$(top_srcdir) $(APERTIUM_CFLAGS)
+ CLEANFILES = *~ apertium_destxt.cc apertium_retxt.cc apertium_deshtml.cc \
+--- a/configure.ac
++++ b/configure.ac
+@@ -142,7 +142,7 @@
+ 
+ 
+ PKG_CHECK_MODULES(APERTIUM, [dnl
+-  lttoolbox-3.2 >= required_lttoolbox_version dnl
++  lttoolbox >= required_lttoolbox_version dnl
+   libxml-2.0 >= required_libxml_version dnl
+   libpcre >= required_libpcre_version], CPPFLAGS="$CPPFLAGS $APERTIUM_CFLAGS"; LIBS="$LIBS $APERTIUM_LIBS")
+ 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-misc/apertium/files/, sci-misc/apertium/
@ 2022-12-18  4:20 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-12-18  4:20 UTC (permalink / raw
  To: gentoo-commits

commit:     8d5fa18ed281bdfa792b21c9d1d86cd2ff3642fc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 18 03:48:03 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 18 04:01:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d5fa18e

sci-misc/apertium: add 3.8.3

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-misc/apertium/Manifest                         |  1 +
 sci-misc/apertium/apertium-3.8.3.ebuild            | 65 ++++++++++++++++++++++
 .../apertium/files/apertium-3.8.3-bashism.patch    | 30 ++++++++++
 3 files changed, 96 insertions(+)

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}"


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-18  4:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-18  4:20 [gentoo-commits] repo/gentoo:master commit in: sci-misc/apertium/files/, sci-misc/apertium/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-03-07 14:36 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox