From 15fc9670860330228bdc7dff6eb79404d5d98020 Mon Sep 17 00:00:00 2001 From: fabolous005 Date: Mon, 25 Nov 2024 19:56:19 +0100 Subject: [PATCH] add first tws ebuild --- app-finances/tws/tws-10.0x.ebuild | 211 ++++++++++++++++++ .../app-emulation/virt-manager-4.1.0-r1 | 2 +- .../md5-cache/www-servers/engler-labs-0.1 | 9 + 3 files changed, 221 insertions(+), 1 deletion(-) create mode 100644 app-finances/tws/tws-10.0x.ebuild create mode 100644 metadata/md5-cache/www-servers/engler-labs-0.1 diff --git a/app-finances/tws/tws-10.0x.ebuild b/app-finances/tws/tws-10.0x.ebuild new file mode 100644 index 0000000..fedc373 --- /dev/null +++ b/app-finances/tws/tws-10.0x.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CHECKREQS_DISK_BUILD=20G +inherit check-reqs desktop unpacker xdg + +DESCRIPTION="Wolfram Mathematica" + +# Note: Please do not "remove old". Mathematica is licensed by version, and there +# are certainly still active installations of old versions around. +# That said, the compatibility of old versions with new Linux installs is not +# really great... + +HOMEPAGE="https://www.wolfram.com/mathematica/" +SRC_URI=" + testing? ( tws-latest-linux-x64.sh ) + !testing? ( tws-stable-linux-x64.sh ) +" +S="${WORKDIR}" + +LICENSE="all-rights-reserved" +KEYWORDS="-* ~amd64" +SLOT="0" +IUSE="bundle cuda doc ffmpeg R" + +RESTRICT="strip mirror bindist fetch" + +# Mathematica comes with a lot of bundled stuff. We should place here only what we +# explicitly override with LD_PRELOAD. +# RLink (libjri.so) requires dev-lang/R +# FFmpegTools (FFmpegToolsSystem-6.0.so) requires media-video/ffmpeg-6.0 +# FFmpegTools (FFmpegToolsSystem-4.4.so) requires media-video/ffmpeg-4.4 +# RDEPEND=" +# dev-libs/openssl-compat:1.1.1 +# dev-qt/qt5compat:6 +# dev-qt/qtbase:6[eglfs,wayland] +# dev-qt/qtsvg:6 +# dev-qt/qtwayland:6[compositor] +# media-libs/freetype +# virtual/libcrypt +# cuda? ( +# >=dev-util/nvidia-cuda-toolkit-11 +# /dev/null || die + # fix ACCESS DENIED issue when installer generate desktop files + sed -e "s|xdg-desktop-icon|xdg-dummy-command|g" -i "Unix/Installer/WolframInstaller" || die + sed -e "s|xdg-desktop-menu|xdg-dummy-command|g" -i "Unix/Installer/WolframInstaller" || die + sed -e "s|xdg-icon-resource|xdg-dummy-command|g" -i "Unix/Installer/WolframInstaller" || die + sed -e "s|xdg-mime|xdg-dummy-command|g" -i "Unix/Installer/WolframInstaller" || die + # fix ACCESS DENIED issue when installer check the avahi-daemon + sed -e "s|avahi-daemon -c|true|g" -i "Unix/Installer/WolframInstaller" || die + # fix ACCESS DENIED issue when installing documentation + sed -e "s|\(exec ./WolframInstaller\) -noprompt|\1 -auto -targetdir=${S}/${M_TARGET}/Documentation -noexec|" -i "Unix/Installer/WolframInstaller" || die + + # in the depths of the installer it tests whether it can write here + # addpredict is by far the simplest solution + addpredict /usr/share/thisisatest + + /bin/sh "Unix/Installer/WolframInstaller" -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 + done < <(find "${S}/${M_TARGET}" -type f -print0) + + einfo 'Removing MacOS- and Windows-specific files' + find "${S}/${M_TARGET}" -type d -\( -name Windows -o -name Windows-x86-64 \ + -o -name MacOSX -o -name MacOSX-x86-64 -o -name Macintosh -\) \ + -exec rm -r {} + || die + + if ! use cuda; then + einfo 'Removing cuda support' + rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions"*.so || die + fi + + # Linux-x86-64/AllVersions is the supported version, other versions remove + einfo 'Removing unsupported RLink versions' + rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux-x86-64/3.5.0" || die + rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux-x86-64/3.6.0" || die + rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/MacOSX-ARM64" || die + # RLink can't use if R not used + if ! use R; then + einfo 'Removing RLink support' + rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux-x86-64/AllVersions/libjri.so" || die + fi + # FFmpegTools can't use if ffmpeg not used + if ! use ffmpeg; then + einfo 'Removing FFmpegTools support' + rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die + fi + + # fix RPATH + while IFS= read -r -d '' i; do + # Use \x7fELF header to separate ELF executables and libraries + # Skip .o files and static files to avoid surprises + [[ $(od -t x1 -N 4 "${i}") == *"7f 45 4c 46"* ]] || continue + [[ -f "${i}" && "${i: -2}" != ".o" ]] || continue + file ${i} + [[ "$(file ${i})" == *"dynamically"* ]] || continue + einfo "Fixing RPATH of ${i}" + patchelf --set-rpath \ +'/'"${M_TARGET}"'/SystemFiles/Libraries/Linux-x86-64:'\ +'/'"${M_TARGET}"'/SystemFiles/Libraries/Linux-x86-64/Qt/lib:'\ +'/'"${M_TARGET}"'/SystemFiles/Java/Linux-x86-64/lib:'\ +'/'"${M_TARGET}"'/SystemFiles/Java/Linux-x86-64/lib/jli:'\ +'$ORIGIN' "${i}" || \ + die "patchelf failed on ${i}" + done < <(find "${S}/${M_TARGET}" -type f -print0) + + # fix broken symbolic link + ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" "${S}/${M_TARGET}/Executables/wolframscript" || die + + # move all over + mv "${S}"/opt "${ED}"/opt || die + + # the autogenerated symlinks point into sandbox, remove + rm "${ED}"/opt/bin/* || die + + # install wrappers instead + for name in ${M_BINARIES} ; do + if [[ -e "${ED}/${M_TARGET}/Executables/${name}" || -h "${ED}/${M_TARGET}/Executables/${name}" ]] ; then + einfo "Generating wrapper for ${name}" + echo '#!/bin/sh' >> "${T}/${name}" || die + echo 'QT_QPA_PLATFORM="wayland;xcb"' >> "${T}/${name}" || die + echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1:/$(get_libdir)/libcrypt.so.1 /${M_TARGET}/Executables/${name} \$*" \ + >> "${T}/${name}" || die + dobin "${T}/${name}" + + einfo "Symlinking ${name} to /opt/bin" + dosym ../../usr/bin/${name} /opt/bin/${name} + else + ewarn "${name} in M_BINARIES does not exist in ${PV}" + fi + done + + # for convenience + if [[ ! -e "${ED}/usr/bin/Mathematica" ]] ; then + dosym WolframNB /usr/bin/Mathematica + fi + + # fix some embedded paths and install desktop files + for filename in $(find "${ED}/${M_TARGET}/SystemFiles/Installation" -name "*.desktop") ; do + einfo "Fixing ${filename}" + sed -e "s|${S}||g" -e 's|^\t\t||g' -e 's|\\+|+|g' -e 's:Version=2.0:Version=1.5:g' -i "${filename}" || die + echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}" || die + domenu "${filename}" + done + + # install icons + for iconsize in 16 32 64 128 256; do + local iconfile="${ED}/${M_TARGET}/SystemFiles/FrontEnd/SystemResources/X/App-${iconsize}.png" + if [ -e "${iconfile}" ]; then + newicon -s "${iconsize}" "${iconfile}" wolfram-wolfram.png + fi + done + + # install mime types + insinto /usr/share/mime/application + for filename in $(find "${ED}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do + basefilename=$(basename "${filename}") + mv "${filename}" "${T}/${basefilename#application-}" || die + doins "${T}/${basefilename#application-}" + done +} + +pkg_nofetch() { + einfo "Please place the Wolfram Mathematica installation file ${SRC_URI}" + einfo "in your \$\{DISTDIR\}." + einfo "Note that to actually run and use Mathematica you need a valid license." + einfo "Wolfram provides time-limited evaluation licenses at ${HOMEPAGE}" +} diff --git a/metadata/md5-cache/app-emulation/virt-manager-4.1.0-r1 b/metadata/md5-cache/app-emulation/virt-manager-4.1.0-r1 index 4ee3eec..3d4c094 100644 --- a/metadata/md5-cache/app-emulation/virt-manager-4.1.0-r1 +++ b/metadata/md5-cache/app-emulation/virt-manager-4.1.0-r1 @@ -14,5 +14,5 @@ REQUIRED_USE=^^ ( python_single_target_python3_10 python_single_target_python3_1 RESTRICT=!test? ( test ) SLOT=0 SRC_URI=https://releases.pagure.org/virt-manager/virt-manager-4.1.0.tar.gz -_eclasses_=toolchain-funcs d3d42b22a610ce81c267b644bcec9b87 multilib b2a329026f2e404e9e371097dda47f96 libtool 6b28392a775f807c8be5fc7ec9a605b9 gnome.org e1b4f392dbfedfb8974b71b017937f08 xdg-utils 42869b3c8d86a70ef3cf75165a395e09 gnome2-utils a8cf148ec7f5ae0b1f1d33ae5f7f9e88 xdg 3ef49a87c52c8b77c476351195dfe575 gnome2 26fd01914b36038dc8e964ff4bd03a95 flag-o-matic f14aba975c94ccaa9f357a27e3b17ffe out-of-source-utils dbf9e34ee8964084651e25907fa8f52c multibuild 4650a65187015567b4e041bb9bfdb364 multiprocessing 1e32df7deee68372153dca65f4a7c21f ninja-utils 2df4e452cea39a9ec8fb543ce059f8d6 python-utils-r1 2fee95c11e5f883024588d4837db6802 python-single-r1 47d8ac9be330c9366112b78fd4f8ce57 distutils-r1 bcc61b7696f06db333c2f2db1606ed76 optfeature 222cb475c5a4f7ae7cfb0bf510a6fe54 +_eclasses_=toolchain-funcs d3d42b22a610ce81c267b644bcec9b87 multilib b2a329026f2e404e9e371097dda47f96 libtool 6b28392a775f807c8be5fc7ec9a605b9 gnome.org e1b4f392dbfedfb8974b71b017937f08 xdg-utils 42869b3c8d86a70ef3cf75165a395e09 gnome2-utils a8cf148ec7f5ae0b1f1d33ae5f7f9e88 xdg 3ef49a87c52c8b77c476351195dfe575 gnome2 26fd01914b36038dc8e964ff4bd03a95 flag-o-matic f14aba975c94ccaa9f357a27e3b17ffe out-of-source-utils dbf9e34ee8964084651e25907fa8f52c multibuild 4650a65187015567b4e041bb9bfdb364 multiprocessing 1e32df7deee68372153dca65f4a7c21f ninja-utils 2df4e452cea39a9ec8fb543ce059f8d6 python-utils-r1 2fee95c11e5f883024588d4837db6802 python-single-r1 47d8ac9be330c9366112b78fd4f8ce57 distutils-r1 db6e4e998c9effc162bd2aa3b0d8f855 optfeature 222cb475c5a4f7ae7cfb0bf510a6fe54 _md5_=3d3d774b752d646591e035b682ef6626 diff --git a/metadata/md5-cache/www-servers/engler-labs-0.1 b/metadata/md5-cache/www-servers/engler-labs-0.1 new file mode 100644 index 0000000..afd80fe --- /dev/null +++ b/metadata/md5-cache/www-servers/engler-labs-0.1 @@ -0,0 +1,9 @@ +DEFINED_PHASES=install prepare unpack +DESCRIPTION=My person webserver +EAPI=8 +HOMEPAGE=http://git.engler-labs.root64.de +KEYWORDS=* +LICENSE=MIT +SLOT=0 +SRC_URI=http://git.engler-labs.root64.de/fabolous005/engler-labs/releases/download/0.1/engler-labs -> engler-labs http://git.engler-labs.root64.de/fabolous005/engler-labs/archive/0.1.tar.gz -> engler-labs-0.1.tar.gz +_md5_=070801505fc663919e9c787f91b283ec