summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-25 19:23:43 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-25 19:23:43 +0000
commit557557a51d72b88682aa3b75c1f0e845eb3fa35a (patch)
treed6c63ea964ae9da4fc4b66e7ad13f93cddf6e8cf
parent0a5a9b325822f8110edade4c2dd92eee0aa47959 (diff)
dev-libs/liborcus : fix PYTHON_COMPAT (https://bugs.gentoo.org/897734)
-rw-r--r--dev-libs/liborcus/Manifest1
-rw-r--r--dev-libs/liborcus/files/liborcus-0.17.0-test-fix.patch51
-rw-r--r--dev-libs/liborcus/files/liborcus-0.17.2-clang.patch26
-rw-r--r--dev-libs/liborcus/files/liborcus-0.17.2-gcc-13.patch29
-rw-r--r--dev-libs/liborcus/files/liborcus-0.17.2-python-optional.patch26
-rw-r--r--dev-libs/liborcus/liborcus-0.17.2-r1.ebuild70
-rw-r--r--metadata/md5-cache/dev-libs/liborcus-0.17.2-r117
-rw-r--r--metadata/pkg_desc_index1
8 files changed, 221 insertions, 0 deletions
diff --git a/dev-libs/liborcus/Manifest b/dev-libs/liborcus/Manifest
new file mode 100644
index 00000000..a10f5c5f
--- /dev/null
+++ b/dev-libs/liborcus/Manifest
@@ -0,0 +1 @@
+DIST liborcus-0.17.2.tar.xz 1839188 BLAKE2B d274e3af71df16866e305403d63d3978613915753412ac9de19d7de7802930c3886d8653d6d48a8d9a971dc0ee284f8f83af8dc07850b5f28fcdab2815b6d9b2 SHA512 8ad8db46c23673260057aff555286d95ebfeff0a027bdeae24f11f8aa12456284f7f4446edddb91936b3011eb1227cfe1618ab3c4d909f8356c8c151f5739d79
diff --git a/dev-libs/liborcus/files/liborcus-0.17.0-test-fix.patch b/dev-libs/liborcus/files/liborcus-0.17.0-test-fix.patch
new file mode 100644
index 00000000..1de33a7e
--- /dev/null
+++ b/dev-libs/liborcus/files/liborcus-0.17.0-test-fix.patch
@@ -0,0 +1,51 @@
+# https://bugs.gentoo.org/713586
+
+[PATCH] Build orcus-env-dump unconditionally
+
+The rule for `orcus-env-dump.o` is guarded by `if WITH_TOOLS` however,
+the rule for the executable `orcus-env-dump` is not. This leads to
+linking errors when running the test suite without tools.
+
+Move the rule for `orcus-env-dump.o` out of the if WITH_TOOLS block to
+always build it.
+---
+ src/Makefile.am | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -25,6 +25,16 @@ orcus_test_xml_LDADD = \
+
+ orcus_test_xml_CPPFLAGS = -I$(top_builddir)/lib/liborcus/liborcus.la $(AM_CPPFLAGS) -DSRCDIR=\""$(top_srcdir)"\"
+
++#----------------------------------------------------------------------------
++
++# orcus-env-dump
++
++orcus_env_dump_SOURCES = orcus_env_dump.cpp
++orcus_env_dump_LDADD = \
++ parser/liborcus-parser-@ORCUS_API_VERSION@.la \
++ liborcus/liborcus-@ORCUS_API_VERSION@.la
++orcus_env_dump_CPPFLAGS = -I$(top_builddir)/lib/liborcus/liborcus.la $(AM_CPPFLAGS)
++
+
+ TESTS = \
+ orcus-test-xml \
+@@ -136,16 +146,6 @@ orcus_detect_CPPFLAGS = -I$(top_builddir)/lib/liborcus/liborcus.la $(AM_CPPFLAGS
+
+ #----------------------------------------------------------------------------
+
+-# orcus-env-dump
+-
+-orcus_env_dump_SOURCES = orcus_env_dump.cpp
+-orcus_env_dump_LDADD = \
+- parser/liborcus-parser-@ORCUS_API_VERSION@.la \
+- liborcus/liborcus-@ORCUS_API_VERSION@.la
+-orcus_env_dump_CPPFLAGS = -I$(top_builddir)/lib/liborcus/liborcus.la $(AM_CPPFLAGS)
+-
+-#----------------------------------------------------------------------------
+-
+ if BUILD_SPREADSHEET_MODEL
+
+ orcus_json_LDADD += \
diff --git a/dev-libs/liborcus/files/liborcus-0.17.2-clang.patch b/dev-libs/liborcus/files/liborcus-0.17.2-clang.patch
new file mode 100644
index 00000000..62950cfc
--- /dev/null
+++ b/dev-libs/liborcus/files/liborcus-0.17.2-clang.patch
@@ -0,0 +1,26 @@
+https://gitlab.com/orcus/orcus/-/commit/469aca3c76965b9031947506a15d940cbcd11cdb
+
+From: Tom Stellard <tstellar@redhat.com>
+Date: Mon, 16 May 2022 22:12:30 +0000
+Subject: [PATCH] Fix error when compiling with clang
+
+csv.cpp:83:29: error: non-constant-expression cannot be narrowed from type 'Py_ssize_t' (aka 'long') to 'std::basic_string_view::size_type' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
+ app.read_stream({p, n});
+ ^
+csv.cpp:83:29: note: insert an explicit cast to silence this issue
+ app.read_stream({p, n});
+ ^
+ static_cast<size_type>( )
+1 error generated.
+--- a/src/python/csv.cpp
++++ b/src/python/csv.cpp
+@@ -80,7 +80,7 @@ PyObject* csv_read(PyObject* /*module*/, PyObject* args, PyObject* kwargs)
+
+ Py_ssize_t n = 0;
+ const char* p = PyUnicode_AsUTF8AndSize(str.get(), &n);
+- app.read_stream({p, n});
++ app.read_stream({p, static_cast<std::string_view::size_type>(n)});
+
+ return create_document(std::move(doc));
+ }
+GitLab
diff --git a/dev-libs/liborcus/files/liborcus-0.17.2-gcc-13.patch b/dev-libs/liborcus/files/liborcus-0.17.2-gcc-13.patch
new file mode 100644
index 00000000..fa489205
--- /dev/null
+++ b/dev-libs/liborcus/files/liborcus-0.17.2-gcc-13.patch
@@ -0,0 +1,29 @@
+https://gitlab.com/orcus/orcus/-/commit/fa68d6a76778df26e41108e3400f4a907e351203
+https://gitlab.com/orcus/orcus/-/merge_requests/136
+
+From fa68d6a76778df26e41108e3400f4a907e351203 Mon Sep 17 00:00:00 2001
+From: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue, 19 Jul 2022 21:11:16 -0400
+Subject: [PATCH] Explicitly include <cstdint> header with GCC 13 (#162)
+
+c.f. https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
+--- a/include/orcus/base64.hpp
++++ b/include/orcus/base64.hpp
+@@ -9,6 +9,7 @@
+ #define __ORCUS_BASE64_HPP__
+
+ #include "env.hpp"
++#include <cstdint>
+ #include <vector>
+ #include <string>
+
+--- a/include/orcus/types.hpp
++++ b/include/orcus/types.hpp
+@@ -8,6 +8,7 @@
+ #ifndef INCLUDED_ORCUS_TYPES_HPP
+ #define INCLUDED_ORCUS_TYPES_HPP
+
++#include <cstdint>
+ #include <cstdlib>
+ #include <vector>
+ #include <string>
diff --git a/dev-libs/liborcus/files/liborcus-0.17.2-python-optional.patch b/dev-libs/liborcus/files/liborcus-0.17.2-python-optional.patch
new file mode 100644
index 00000000..9473958c
--- /dev/null
+++ b/dev-libs/liborcus/files/liborcus-0.17.2-python-optional.patch
@@ -0,0 +1,26 @@
+From 14d15bf331b5cc3ca2c1cdb8097dfe918173cba1 Mon Sep 17 00:00:00 2001
+From: matoro <11910244-matoro3@users.noreply.gitlab.com>
+Date: Wed, 24 Aug 2022 13:42:27 -0400
+Subject: [PATCH] Only recurse into src/python when BUILD_PYTHON is set
+
+---
+ src/Makefile.am | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index d586299c..7e44aed8 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,4 +1,8 @@
+-SUBDIRS = include test parser mso liborcus spreadsheet python
++SUBDIRS = include test parser mso liborcus spreadsheet
++
++if BUILD_PYTHON
++SUBDIRS += python
++endif
+
+ AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+--
+GitLab
+
diff --git a/dev-libs/liborcus/liborcus-0.17.2-r1.ebuild b/dev-libs/liborcus/liborcus-0.17.2-r1.ebuild
new file mode 100644
index 00000000..000ffa82
--- /dev/null
+++ b/dev-libs/liborcus/liborcus-0.17.2-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+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
+ MDDS_SLOT="1/2.0"
+ EGIT_REPO_URI="https://gitlab.com/orcus/orcus.git"
+ inherit git-r3
+else
+ MDDS_SLOT="1/2.0"
+ SRC_URI="https://kohei.us/files/orcus/src/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0/0.17" # based on SONAME of liborcus.so
+IUSE="python +spreadsheet-model test tools"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/boost:=[zlib(+)]
+ sys-libs/zlib
+ python? ( ${PYTHON_DEPS} )
+ spreadsheet-model? ( dev-libs/libixion:${SLOT} )
+"
+DEPEND="${RDEPEND}
+ dev-util/mdds:${MDDS_SLOT}
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-clang.patch
+ "${FILESDIR}"/${P}-gcc-13.patch
+ "${FILESDIR}"/${P}-python-optional.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # bug 713586
+ use test && eapply "${FILESDIR}/${PN}-0.17.0-test-fix.patch"
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-werror
+ $(use_enable python)
+ $(use_enable spreadsheet-model)
+ $(use_with tools)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -type f -delete || die
+}
diff --git a/metadata/md5-cache/dev-libs/liborcus-0.17.2-r1 b/metadata/md5-cache/dev-libs/liborcus-0.17.2-r1
new file mode 100644
index 00000000..b3189912
--- /dev/null
+++ b/metadata/md5-cache/dev-libs/liborcus-0.17.2-r1
@@ -0,0 +1,17 @@
+BDEPEND=sys-devel/gnuconfig >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.5:1.16 ) >=sys-devel/autoconf-2.71-r5 >=sys-devel/libtool-2.4.7
+DEFINED_PHASES=configure install prepare setup
+DEPEND=dev-libs/boost:=[zlib(+)] sys-libs/zlib python? ( python_single_target_python3_9? ( >=dev-lang/python-3.9.16-r1:3.9 ) python_single_target_python3_10? ( >=dev-lang/python-3.10.9-r1:3.10 ) python_single_target_python3_11? ( >=dev-lang/python-3.11.1-r1:3.11 ) ) spreadsheet-model? ( dev-libs/libixion:0/0.17 ) dev-util/mdds:1/2.0
+DESCRIPTION=Standalone file import filter library for spreadsheet documents
+EAPI=8
+HOMEPAGE=https://gitlab.com/orcus/orcus/blob/master/README.md
+INHERIT=autotools python-single-r1
+IUSE=python +spreadsheet-model test tools python_single_target_python3_9 python_single_target_python3_10 python_single_target_python3_11
+KEYWORDS=~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~x86
+LICENSE=MIT
+RDEPEND=dev-libs/boost:=[zlib(+)] sys-libs/zlib python? ( python_single_target_python3_9? ( >=dev-lang/python-3.9.16-r1:3.9 ) python_single_target_python3_10? ( >=dev-lang/python-3.10.9-r1:3.10 ) python_single_target_python3_11? ( >=dev-lang/python-3.11.1-r1:3.11 ) ) spreadsheet-model? ( dev-libs/libixion:0/0.17 )
+REQUIRED_USE=python? ( ^^ ( python_single_target_python3_9 python_single_target_python3_10 python_single_target_python3_11 ) )
+RESTRICT=!test? ( test )
+SLOT=0/0.17
+SRC_URI=https://kohei.us/files/orcus/src/liborcus-0.17.2.tar.xz
+_eclasses_=autotools 6dcd6b6a486e79928e1243ff9ba41fcc gnuconfig b6b3e92f8b8c996400074b5f61a59256 libtool 241a8f577b9781a42a7421e53448a44e multilib 5ca4e49abed8e3a2f7b56920eadee157 multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 python-single-r1 75118e916668a74c660a13b0ecb22562 python-utils-r1 429bfd4e8d8e39db5385ba5744f30788 toolchain-funcs 6001248ef162a5fa2a21ce132a212f6b
+_md5_=49c58fe81654f05dca0ede07c8725204
diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index
index bb9f08cf..6fbe67e9 100644
--- a/metadata/pkg_desc_index
+++ b/metadata/pkg_desc_index
@@ -17,6 +17,7 @@ dev-go/go-protobuf 1.5.2: Go support for Google's protocol buffers
dev-go/protoc-gen-go-grpc 1.2.0: This tool generates Go language bindings of services in protobuf definition files for gRPC
dev-libs/libdbusmenu-qt 0.9.3_pre20160218-r2: A library providing Qt implementation of DBusMenu specification (meta mackage)
dev-libs/libdbusmenu-qt5 0.9.3_pre20160218-r3: Library providing Qt implementation of DBusMenu specification
+dev-libs/liborcus 0.17.2-r1: Standalone file import filter library for spreadsheet documents
dev-python/animation 0.0.5-r3: Tools for terminal-based wait animations
dev-python/click 7.1.2-r100: A Python package for creating beautiful command line interfaces
dev-python/sh 1.12.14-r5: Python process launching