summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Beddek <telans@posteo.de>2021-10-31 15:37:13 +1300
committerSam James <sam@gentoo.org>2021-11-14 05:24:32 +0000
commit6d2facc6865eeebf112e7690c28504ed687dbe8f (patch)
tree609224ad79795fd850287a522902b9b180d151cb /dev-libs/liborcus
parentdev-util/mdds: add 2.0.0 (diff)
downloadgentoo-6d2facc6865eeebf112e7690c28504ed687dbe8f.tar.gz
gentoo-6d2facc6865eeebf112e7690c28504ed687dbe8f.tar.bz2
gentoo-6d2facc6865eeebf112e7690c28504ed687dbe8f.zip
dev-libs/liborcus: fix build failure with USE=-tools
Closes: https://bugs.gentoo.org/713586 Signed-off-by: James Beddek <telans@posteo.de> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/liborcus')
-rw-r--r--dev-libs/liborcus/files/liborcus-0.17.0-test-fix.patch51
-rw-r--r--dev-libs/liborcus/liborcus-0.16.1.ebuild13
2 files changed, 60 insertions, 4 deletions
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 000000000000..1de33a7e3f4c
--- /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/liborcus-0.16.1.ebuild b/dev-libs/liborcus/liborcus-0.16.1.ebuild
index 11e425439697..18b38d862e5e 100644
--- a/dev-libs/liborcus/liborcus-0.16.1.ebuild
+++ b/dev-libs/liborcus/liborcus-0.16.1.ebuild
@@ -4,7 +4,8 @@
EAPI=7
PYTHON_COMPAT=( python3_{8..10} )
-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"
@@ -12,7 +13,7 @@ HOMEPAGE="https://gitlab.com/orcus/orcus/blob/master/README.md"
if [[ ${PV} == *9999* ]]; then
MDDS_SLOT="1/9999"
EGIT_REPO_URI="https://gitlab.com/orcus/orcus.git"
- inherit git-r3 autotools
+ inherit git-r3
else
MDDS_SLOT="1/1.5"
SRC_URI="https://kohei.us/files/orcus/src/${P}.tar.xz"
@@ -21,9 +22,10 @@ fi
LICENSE="MIT"
SLOT="0/0.16" # based on SONAME of liborcus.so
-IUSE="python +spreadsheet-model tools"
+IUSE="python +spreadsheet-model test tools"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/boost:=[zlib(+)]
@@ -42,8 +44,11 @@ pkg_setup() {
}
src_prepare() {
+ # bug 713586
+ use test && eapply "${FILESDIR}/${PN}-0.17.0-test-fix.patch"
+
default
- [[ ${PV} == *9999 ]] && eautoreconf
+ eautoreconf
}
src_configure() {