diff options
author | Matoro Mahri <matoro@users.noreply.github.com> | 2022-09-30 21:16:41 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-08 18:09:28 +0100 |
commit | 3185d41c5e481a797773b8e72db02ebb3773ed65 (patch) | |
tree | dc7ba2e6a16cf4a7fbd5df033167ec6eefc6a177 /x11-libs/wxGTK | |
parent | app-text/dblatex: add self as dep for tests (diff) | |
download | gentoo-3185d41c5e481a797773b8e72db02ebb3773ed65.tar.gz gentoo-3185d41c5e481a797773b8e72db02ebb3773ed65.tar.bz2 gentoo-3185d41c5e481a797773b8e72db02ebb3773ed65.zip |
x11-libs/wxGTK: add tests
Note that upstream actually replaced cppunit with catch very soon after
this tagged for 3.2.0, this changes the command-line syntax so this will
need to be updated when the 3.2 branch is packaged.
Bug: https://bugs.gentoo.org/856871
Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-libs/wxGTK')
-rw-r--r-- | x11-libs/wxGTK/files/wxGTK-configure-tests.patch | 28 | ||||
-rw-r--r-- | x11-libs/wxGTK/wxGTK-3.0.5.1.ebuild | 14 |
2 files changed, 40 insertions, 2 deletions
diff --git a/x11-libs/wxGTK/files/wxGTK-configure-tests.patch b/x11-libs/wxGTK/files/wxGTK-configure-tests.patch new file mode 100644 index 000000000000..efbb2d7c55bf --- /dev/null +++ b/x11-libs/wxGTK/files/wxGTK-configure-tests.patch @@ -0,0 +1,28 @@ +diff --git a/configure b/configure +index 0f3c4c9..92c84f3 100755 +--- a/configure ++++ b/configure +@@ -1368,6 +1368,7 @@ enable_dependency_tracking + enable_precomp_headers + with_cppunit_prefix + with_cppunit_exec_prefix ++enable_tests + ' + ac_precious_vars='build_alias + host_alias +@@ -40955,8 +40956,13 @@ fi + + fi + +- +- ++# explicit override to enable or disable tests ++if test "${enable_tests+set}" = set; then ++ SUBDIRS="$SUBDIRS tests" ++fi ++if test "${disable_tests+set}" = set; then ++ SUBDIRS="${SUBDIRS% tests}" ++fi + + + for subdir in $SUBDIRS; do diff --git a/x11-libs/wxGTK/wxGTK-3.0.5.1.ebuild b/x11-libs/wxGTK/wxGTK-3.0.5.1.ebuild index a7260ae5a0be..bb964df9baf4 100644 --- a/x11-libs/wxGTK/wxGTK-3.0.5.1.ebuild +++ b/x11-libs/wxGTK/wxGTK-3.0.5.1.ebuild @@ -21,7 +21,9 @@ S="${WORKDIR}/wxWidgets-${PV}" LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )" SLOT="${WXRELEASE}" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux" -IUSE="+X doc debug gstreamer libnotify opengl pch sdl tiff webkit" +IUSE="+X doc debug gstreamer libnotify opengl sdl test tiff webkit" +REQUIRED_USE="test? ( tiff ) tiff? ( X )" +RESTRICT="!test? ( test )" RDEPEND=" >=app-eselect/eselect-wxwidgets-20131230 @@ -52,6 +54,7 @@ DEPEND="${RDEPEND} opengl? ( virtual/glu[${MULTILIB_USEDEP}] ) X? ( x11-base/xorg-proto )" BDEPEND=" + test? ( >=dev-util/cppunit-1.8.0 ) >=app-eselect/eselect-wxwidgets-20131230 virtual/pkgconfig" @@ -59,6 +62,7 @@ PATCHES=( "${WORKDIR}"/wxGTK-3.0.5_p20210214/ "${FILESDIR}"/wxGTK-${SLOT}-translation-domain.patch "${FILESDIR}"/wxGTK-ignore-c++-abi.patch #676878 + "${FILESDIR}/${PN}-configure-tests.patch" ) src_prepare() { @@ -72,7 +76,7 @@ src_prepare() { -e "s:aclocal):aclocal/wxwin${WXRELEASE_NODOT}.m4):" \ -e "s:wxstd.mo:wxstd${WXRELEASE_NODOT}.mo:" \ -e "s:wxmsw.mo:wxmsw${WXRELEASE_NODOT}.mo:" \ - Makefile.in || die + Makefile.in tests/Makefile.in || die sed -i \ -e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\ @@ -128,6 +132,7 @@ multilib_src_configure() { $(use_with libnotify) $(use_with opengl) $(use_with tiff libtiff sys) + $(use_enable test tests) ) # wxBase options @@ -136,6 +141,11 @@ multilib_src_configure() { ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" } +multilib_src_test() { + emake -C tests + (cd tests && ./test) || die +} + multilib_src_install_all() { cd docs || die dodoc changes.txt readme.txt |