commit:     c0a2507760c429b84384757fb317200bfba0ec46
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 23 15:48:44 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 23 15:49:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0a25077

sci-geosciences/mapserver: misc tweaks

* Wire up tests
* Disable building fuzzing harness/reproducers

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

 sci-geosciences/mapserver/mapserver-8.2.2.ebuild | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/sci-geosciences/mapserver/mapserver-8.2.2.ebuild 
b/sci-geosciences/mapserver/mapserver-8.2.2.ebuild
index 91d7c76780a7..bcfb04e9da81 100644
--- a/sci-geosciences/mapserver/mapserver-8.2.2.ebuild
+++ b/sci-geosciences/mapserver/mapserver-8.2.2.ebuild
@@ -19,22 +19,10 @@ SRC_URI="https://download.osgeo.org/mapserver/${P}.tar.gz";
 LICENSE="Boost-1.0 BSD BSD-2 ISC MIT tcltk"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-
 # NOTE: opengl removed for now as no support for it in upstream CMake
-IUSE="apache bidi cairo geos java mysql oracle perl postgis python"
-
+IUSE="apache bidi cairo geos java mysql oracle perl postgis python test"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-# Tests:
-# Included tests (tests/*) are seriously outdated
-# Upstream's main test suite (msautotest/*) is not in the release tarball,
-# and upstream sets 'export-ignore' for that directory.
-#
-# The eclasses used normally try to run test suites themselves,
-# or skip if nothing was found.
-# However, because of the python-r1 eclass usage, this fails and would
-# cause errors running non-existent tests, so we have to restrict here.
-RESTRICT="test"
+RESTRICT="!test? ( test )"
 
 RDEPEND="
        >=dev-libs/expat-2.2.8
@@ -136,6 +124,8 @@ src_configure() {
        # and reliant on defaults not changing.
        # Readability and maintainability is better this way.
        local mycmakeargs=(
+               "-DBUILD_TESTING=$(usex test)"
+               "-DBUILD_FUZZER_REPRODUCER=OFF"
                "-DCMAKE_SKIP_RPATH=ON"
                "-DINSTALL_LIB_DIR=/usr/$(get_libdir)"
                "-DCMAKE_INSTALL_SYSCONFDIR=/usr/share/${PN}"
@@ -193,6 +183,12 @@ src_compile() {
        fi
 }
 
+src_test() {
+       local -x LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}"
+
+       cmake_src_test
+}
+
 src_install() {
        # Needs to be first
        use apache && webapp_src_preinst

Reply via email to