diff --git a/editors/linux-r7-office/Makefile b/editors/linux-r7-office/Makefile index 4d242d6ef6e2..977ab79fbb9e 100644 --- a/editors/linux-r7-office/Makefile +++ b/editors/linux-r7-office/Makefile @@ -1,54 +1,55 @@ PORTNAME= r7-office PORTVERSION= 7.2.2 PORTREVISION= 1 CATEGORIES= editors linux russian MASTER_SITES= https://download.r7-office.ru/ubuntu/ DISTNAME= r7-office EXTRACT_SUFX= .deb MAINTAINER= arrowd@FreeBSD.org COMMENT= Russian office suite WWW= https://r7-office.ru LICENSE= commercial LICENSE_NAME= commercial LICENSE_TEXT= Commercial software with 30 days trial period LICENSE_PERMS= dist-mirror pkg-mirror auto-accept ONLY_FOR_ARCHS= amd64 USES= desktop-file-utils linux shebangfix tar:xz USE_LINUX= alsalib base cups-libs gtk3 pulseaudio-libs systemd-libs nss \ xorglibs SHEBANG_FILES= opt/r7-office/desktopeditors/converter/.system/check.sh WRKSRC= ${WRKDIR} NO_BUILD= yes PLIST_SUB= LINUXBASE=${LINUXBASE} STRIP= post-extract: cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} data.tar.xz ${EXTRACT_AFTER_ARGS} post-patch: + ${REINPLACE_CMD} -i '' 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKDIR}/usr/bin/r7-office-* ${REINPLACE_CMD} -i '' 's|/usr/bin/|${PREFIX}/bin/|' ${WRKDIR}/usr/share/applications/*.desktop do-install: ${INSTALL_PROGRAM} ${WRKDIR}/usr/bin/r7-office-* ${STAGEDIR}${PREFIX}/bin/ ${RLN} ${STAGEDIR}${PREFIX}/bin/r7-office-desktopeditors ${STAGEDIR}${PREFIX}/bin/r7-office cd ${WRKDIR}/opt && ${CP} -r r7-office ${STAGEDIR}${PREFIX}/share cd ${WRKDIR}/usr/share && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/share ${RLN} ${STAGEDIR}${DATADIR}/desktopeditors/asc-de-256.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/r7-office.png ${RM} ${STAGEDIR}${PREFIX}/share/flyfm/templates/.source/* .for f in new.docx new.pptx new.xlsx ${RLN} ${STAGEDIR}${DATADIR}/desktopeditors/converter/empty/${f} \ ${STAGEDIR}${PREFIX}/share/flyfm/templates/.source/${f} .endfor ${MKDIR} ${STAGEDIR}${LINUXBASE}/etc/r7-office .include diff --git a/editors/linux-r7-office/files/patch-usr_bin_r7-office-desktopeditors b/editors/linux-r7-office/files/patch-usr_bin_r7-office-desktopeditors index 7de4e77687cc..75b72e5e421e 100644 --- a/editors/linux-r7-office/files/patch-usr_bin_r7-office-desktopeditors +++ b/editors/linux-r7-office/files/patch-usr_bin_r7-office-desktopeditors @@ -1,23 +1,23 @@ --- usr/bin/r7-office-desktopeditors.orig 2022-12-11 00:52:25 UTC +++ usr/bin/r7-office-desktopeditors @@ -73,7 +73,7 @@ check_templates() { return 0 fi - SOURCE_DOC_DIR="/opt/r7-office/desktopeditors/converter/empty" -+ SOURCE_DOC_DIR="/usr/local/share/r7-office/desktopeditors/converter/empty" ++ SOURCE_DOC_DIR="%%LOCALBASE%%/share/r7-office/desktopeditors/converter/empty" set_names_ru @@ -107,8 +107,9 @@ check_templates "$@" check_templates "$@" -DIR=/opt/r7-office/desktopeditors -DIR_MV=/opt/r7-office/mediaviewer -+DIR=/usr/local/share/r7-office/desktopeditors -+DIR_MV=/usr/local/share/r7-office/mediaviewer ++DIR=%%LOCALBASE%%/share/r7-office/desktopeditors ++DIR_MV=%%LOCALBASE%%/share/r7-office/mediaviewer export LD_LIBRARY_PATH=$DIR:$DIR/converter:$DIR_MV:$LD_LIBRARY_PATH export VLC_PLUGIN_PATH=$DIR_MV/plugins +export LC_CTYPE=ru_RU.UTF-8 exec $DIR/DesktopEditors "$@" diff --git a/editors/linux-r7-office/files/patch-usr_bin_r7-office-imageviewer b/editors/linux-r7-office/files/patch-usr_bin_r7-office-imageviewer index 5960cd6c0c2e..7ec1ac69fec2 100644 --- a/editors/linux-r7-office/files/patch-usr_bin_r7-office-imageviewer +++ b/editors/linux-r7-office/files/patch-usr_bin_r7-office-imageviewer @@ -1,10 +1,10 @@ --- usr/bin/r7-office-imageviewer.orig 2022-12-11 00:52:25 UTC +++ usr/bin/r7-office-imageviewer @@ -1,5 +1,6 @@ #!/bin/sh -DIR=/opt/r7-office/mediaviewer -+DIR=/usr/local/share/r7-office/mediaviewer ++DIR=%%LOCALBASE%%/share/r7-office/mediaviewer export LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH +export LC_CTYPE=ru_RU.UTF-8 exec $DIR/ImageViewer "$@" diff --git a/editors/linux-r7-office/files/patch-usr_bin_r7-office-videoplayer b/editors/linux-r7-office/files/patch-usr_bin_r7-office-videoplayer index 9dd1d6ce0258..6ac537853f7c 100644 --- a/editors/linux-r7-office/files/patch-usr_bin_r7-office-videoplayer +++ b/editors/linux-r7-office/files/patch-usr_bin_r7-office-videoplayer @@ -1,10 +1,10 @@ --- usr/bin/r7-office-videoplayer.orig 2022-12-11 00:52:25 UTC +++ usr/bin/r7-office-videoplayer @@ -1,5 +1,6 @@ #!/bin/sh -DIR=/opt/r7-office/mediaviewer -+DIR=/usr/local/share/r7-office/mediaviewer ++DIR=%%LOCALBASE%%/share/r7-office/mediaviewer export LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH +export LC_CTYPE=ru_RU.UTF-8 exec $DIR/VideoPlayer "$@"