Пост #272488 |
сохранен 12.02.2024 20:02
- Редактировать пост
- Печать
- Скачать
- Посты-ответы на этот пост: # 276486
- Посмотреть дерево постов
-
Сравнить с постом
#
Текст поста
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit xdg unpacker DESCRIPTION="office" HOMEPAGE="https://myoffice.ru/products/standard-home-edition/" SRC_URI="https://preset.myoffice-app.ru/myoffice-standard-home-edition_${PV}_amd64.deb" SLOT="0" KEYWORDS="~amd64" IUSE="" # needs full qt stack RDEPEND="dev-qt/qtwidgets:5" RDEPEND="media-libs/libpulse" S=${WORKDIR} src_unpack() { unpack_deb ${A} } src_compile() { :; } make_wrapper_my() { local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5 local tmpwrapper="${T}/tmp.wrapper.${wrapper##*/}" ( echo '#!/bin/bash' if [[ -n ${libdir} ]] ; then local var if [[ ${CHOST} == *-darwin* ]] ; then var=DYLD_LIBRARY_PATH else var=LD_LIBRARY_PATH fi sed 's/^X//' <<-EOF || die if [ "\${${var}+set}" = "set" ] ; then X export ${var}="\${${var}}:${EPREFIX}${libdir}" else X export ${var}="${EPREFIX}${libdir}" fi EOF fi [[ -n ${chdir} ]] && printf 'cd "%s" &&\n' "${EPREFIX}${chdir}" # We don't want to quote ${bin} so that people can pass complex # things as ${bin} ... "./someprog --args" printf '%s "$@"\n' "${bin/#\//${EPREFIX}/}" ) > "${tmpwrapper}" chmod go+rx "${tmpwrapper}" if [[ -n ${path} ]] ; then ( exeopts -m 0755 exeinto "${path}" newexe "${tmpwrapper}" "${wrapper}" ) || die else newbin "${tmpwrapper}" "${wrapper}" fi } src_install() { dodir /opt cp -pPR "${S}/opt/myoffice-standard-home-edition" "${D}/opt/" || die make_wrapper_my myoffice-text "QT_PLUGIN_PATH=/opt/myoffice-standard-home-edition/lib/ /opt/myoffice-standard-home-edition/MyOffice\ Text\ Home\ Edition.sh" make_wrapper_my myoffice-spreadsheet "QT_PLUGIN_PATH=/opt/myoffice-standard-home-edition/lib/ /opt/myoffice-standard-home-edition/MyOffice\ Spreadsheet\ Home\ Edition.sh" } |