--- /usr/portage/sci-mathematics/mathematica/mathematica-13.3.1.ebuild 2023-09-27 11:10:36.000000000 +0200 +++ mathematica-13.3.1.ebuild 2023-10-07 22:39:06.705798132 +0200 @@ -3,12 +3,11 @@ EAPI=8 -CHECKREQS_DISK_BUILD=20G inherit check-reqs desktop unpacker xdg DESCRIPTION="Wolfram Mathematica" HOMEPAGE="https://www.wolfram.com/mathematica/" -SRC_URI="Mathematica_${PV}_BNDL_LINUX.sh" +SRC_URI="doc? ( Mathematica_${PV}_BNDL_LINUX.sh ) !doc? ( Mathematica_${PV}_LINUX.sh )" S="${WORKDIR}" LICENSE="all-rights-reserved" @@ -58,6 +57,16 @@ # we might as well list all files in all QA variables... QA_PREBUILT="opt/*" +pkg_pretend() { + CHECKREQS_DISK_BUILD="$(usex doc 20G 10G)" + check-reqs_pkg_pretend +} + +pkg_setup() { + CHECKREQS_DISK_BUILD="$(usex doc 20G 10G)" + check-reqs_pkg_setup +} + src_unpack() { /bin/sh "${DISTDIR}/${A}" --nox11 --keep --target "${S}/unpack_app" -- "-help" || die } @@ -79,11 +88,6 @@ /bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die popd > /dev/null || die - if ! use doc; then - einfo "Removing documentation" - rm -r "${S}/${M_TARGET}/Documentation" || die - fi - # fix world writable file QA problem for files while IFS= read -r -d '' i; do chmod o-w "${i}" || die