diff --git a/srcpkgs/ecl/patches/fix-tests.patch b/srcpkgs/ecl/patches/fix-tests.patch new file mode 100644 index 00000000000..1705be9681d --- /dev/null +++ b/srcpkgs/ecl/patches/fix-tests.patch @@ -0,0 +1,15 @@ +The test config finds the build directory by looking for the file +'BUILD-STAMP'. However, the build system creates 'build-stamp' instead +so it will never be found on a case-sensitive filesystem. + +--- a/src/tests/config.lsp.in 2021-02-01 09:59:46.000000000 -0300 ++++ b/src/tests/config.lsp.in 2021-11-20 18:12:39.318173405 -0300 +@@ -41,7 +41,7 @@ + (loop with root = (si::get-library-pathname) + with lib-name = (format nil "../lib/ecl-~A/" (lisp-implementation-version)) + for base in (list root (merge-pathnames lib-name root)) +- when (or (probe-file (merge-pathnames "./BUILD-STAMP" base)) ++ when (or (probe-file (merge-pathnames "./build-stamp" base)) + (probe-file (merge-pathnames "./COPYING" base))) + do (return base))) + diff --git a/srcpkgs/ecl/template b/srcpkgs/ecl/template index 2f13da4003f..dcfb6ff48a3 100644 --- a/srcpkgs/ecl/template +++ b/srcpkgs/ecl/template @@ -7,7 +7,7 @@ configure_args="--enable-gmp=system --enable-boehm=system --enable-libatomic=system --with-dffi=system" hostmakedepends="pkg-config" makedepends="gc-devel libatomic_ops-devel gmp-devel libffi-devel" -depends=$makedepends +depends="$makedepends" short_desc="Common-Lisp interpreter as described in the X3J13 Ansi specification" maintainer="Kyle Nusbaum " license="LGPL-2.1-or-later" @@ -20,3 +20,18 @@ if [ "$CROSS_BUILD" ]; then hostmakedepends+=" ecl" configure_args+=" --with-cross-config=${XBPS_SRCPKGDIR}/ecl/files/cross_config" fi + +pre_check() { + # These settings enable `make check` to run using the compiled ecl. + # A few tests fail: out of 18098 tests there are ~10 that fail on + # glibc and an additional ~30 fail on musl (the numbers vary as + # some failures seem random.) + # + # The build finishes since `make check` does NOT fail; it is left + # for the future to fix the failing tests and patch make check so + # it actually fails the build. + export ECLDIR=$wrksrc/build/ + export LD_LIBRARY_PATH=$wrksrc/build/ + export TEST_IMAGE=$wrksrc/build/bin/ecl + make_check_args="ECL=$TEST_IMAGE" +}