dev-libs/liborcus: Fix bashisms in configure.ac, --disable-static
authorAndreas Sturmlechner <asturm@gentoo.org>
Thu, 28 May 2020 16:52:15 +0000 (18:52 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Thu, 28 May 2020 17:09:02 +0000 (19:09 +0200)
Reported-by: Matt Whitlock <gentoo@mattwhitlock.name>
Closes: https://bugs.gentoo.org/723130
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
dev-libs/liborcus/files/liborcus-0.15.4-bashism.patch [new file with mode: 0644]
dev-libs/liborcus/liborcus-0.15.4.ebuild
dev-libs/liborcus/liborcus-9999.ebuild

diff --git a/dev-libs/liborcus/files/liborcus-0.15.4-bashism.patch b/dev-libs/liborcus/files/liborcus-0.15.4-bashism.patch
new file mode 100644 (file)
index 0000000..cc201a5
--- /dev/null
@@ -0,0 +1,26 @@
+From 7d2ae0b6e47aa0c1fc43a91300d82c5394420162 Mon Sep 17 00:00:00 2001
+From: Ryo ONODERA <ryo@tetera.org>
+Date: Sat, 11 Jan 2020 23:01:29 +0900
+Subject: [PATCH] Improve POSIX shell portability
+
+DO not use bash syntax.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index bc5dc195..a854c0c9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -322,7 +322,7 @@ AC_ARG_ENABLE([werror],
+       [enable_werror="$enableval"],
+       [enable_werror=no]
+ )
+-AS_IF([test x"$enable_werror" == "xyes"], [
++AS_IF([test x"$enable_werror" = "xyes"], [
+       CXXFLAGS="$CXXFLAGS -Werror"
+ ])
+-- 
+2.26.2
+
index 231fb4345b5b256e3ffa4ae74cf1060dc4cdaa6e..999baa80ea0f7f98dbdc96a4dcd15d89da4f256e 100644 (file)
@@ -4,14 +4,14 @@
 EAPI=7
 
 PYTHON_COMPAT=( python3_{6,7,8} )
-inherit python-single-r1
+inherit autotools python-single-r1
 
 DESCRIPTION="Standalone file import filter library for spreadsheet documents"
 HOMEPAGE="https://gitlab.com/orcus/orcus/blob/master/README.md"
 
 if [[ ${PV} == *9999* ]]; then
        EGIT_REPO_URI="https://gitlab.com/orcus/orcus.git"
-       inherit git-r3 autotools
+       inherit git-r3
 else
        SRC_URI="https://kohei.us/files/orcus/src/${P}.tar.xz"
        KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~x86"
@@ -19,7 +19,9 @@ fi
 
 LICENSE="MIT"
 SLOT="0/0.15" # based on SONAME of liborcus.so
-IUSE="python +spreadsheet-model static-libs tools"
+IUSE="python +spreadsheet-model tools"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 RDEPEND="
        dev-libs/boost:=[zlib(+)]
@@ -31,7 +33,7 @@ DEPEND="${RDEPEND}
        dev-util/mdds:1/1.5
 "
 
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+PATCHES=( "${FILESDIR}/${P}-bashism.patch" ) # bug 723130
 
 pkg_setup() {
        use python && python-single-r1_pkg_setup
@@ -39,15 +41,15 @@ pkg_setup() {
 
 src_prepare() {
        default
-       [[ ${PV} == *9999 ]] && eautoreconf
+       eautoreconf
 }
 
 src_configure() {
        local myeconfargs=(
+               --disable-static
                --disable-werror
                $(use_enable python)
                $(use_enable spreadsheet-model)
-               $(use_enable static-libs static)
                $(use_with tools)
        )
        econf "${myeconfargs[@]}"
index 0ae4b1aa76b62c569cd092e6be1327a7f3d1f824..3aa2c7dcba29d391e422b151ad3bbe86ece82021 100644 (file)
@@ -21,7 +21,9 @@ fi
 
 LICENSE="MIT"
 SLOT="0/0.16" # based on SONAME of liborcus.so
-IUSE="python +spreadsheet-model static-libs tools"
+IUSE="python +spreadsheet-model tools"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 RDEPEND="
        dev-libs/boost:=[zlib(+)]
@@ -33,8 +35,6 @@ DEPEND="${RDEPEND}
        dev-util/mdds:${MDDS_SLOT}
 "
 
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
 pkg_setup() {
        use python && python-single-r1_pkg_setup
 }
@@ -46,10 +46,10 @@ src_prepare() {
 
 src_configure() {
        local myeconfargs=(
+               --disable-static
                --disable-werror
                $(use_enable python)
                $(use_enable spreadsheet-model)
-               $(use_enable static-libs static)
                $(use_with tools)
        )
        econf "${myeconfargs[@]}"