1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

editors/linux-r7-office: Assorted fixes.

- Fix paths in .desktop file.
- Install icon file.
- Override LC_CTYPE with ru_RU.UTF-8 value [*].

[*] linux_base-c7 doesn't have C nor C.UTF-8 locales. This makes R7 Office
render gibberish in file names in the "Open File ..." dialog. The LC_CTYPE
override to ru_RU.UTF-8 makes most sense - the userbase of this suite is likely
to consist of Russian-speaking users. Oterwise the user always may set LC_ALL to
something else to switch R7 Office to the different locale.

Reported by:	fluffy
Sponsored by:	Serenity Cybersecurity, LLC
This commit is contained in:
Gleb Popov 2023-03-06 16:55:52 +03:00
parent f4a869a642
commit 10eb33d808
5 changed files with 42 additions and 14 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= r7-office
PORTVERSION= 7.2.2
PORTREVISION= 1
CATEGORIES= editors linux russian
MASTER_SITES= https://download.r7-office.ru/ubuntu/
DISTNAME= r7-office
@ -32,10 +33,7 @@ post-extract:
cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} data.tar.xz ${EXTRACT_AFTER_ARGS}
post-patch:
${REINPLACE_CMD} 's|/opt/r7-office/|${DATADIR}/|' ${WRKDIR}/usr/bin/r7-office-*
${RM} ${WRKDIR}/usr/bin/*.bak
${REINPLACE_CMD} 's|/usr/bin/|${PREFIX}/|' ${WRKDIR}/usr/share/applications/*.desktop
${RM} ${WRKDIR}/usr/share/applications/*.bak
${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/
@ -43,6 +41,9 @@ do-install:
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} \

View File

@ -1,17 +1,23 @@
--- usr/bin/r7-office-desktopeditors.orig 2022-12-11 00:52:25 UTC
+++ usr/bin/r7-office-desktopeditors
@@ -82,7 +82,7 @@ check_templates() {
echo "system template's folder isn't found"
@@ -73,7 +73,7 @@ check_templates() {
return 0
fi
-
+
TEMPLATE_DOCX="$TEMPLATE_DIR/$NEW_DOCX_NAME.docx"
TEMPLATE_XLSX="$TEMPLATE_DIR/$NEW_XLSX_NAME.xlsx"
TEMPLATE_PPTX="$TEMPLATE_DIR/$NEW_PPTX_NAME.pptx"
@@ -111,4 +111,5 @@ export VLC_PLUGIN_PATH=$DIR_MV/plugins
DIR_MV=/opt/r7-office/mediaviewer
- SOURCE_DOC_DIR="/opt/r7-office/desktopeditors/converter/empty"
+ SOURCE_DOC_DIR="/usr/local/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
export LD_LIBRARY_PATH=$DIR:$DIR/converter:$DIR_MV:$LD_LIBRARY_PATH
export VLC_PLUGIN_PATH=$DIR_MV/plugins
+export LANG=
+export LC_CTYPE=ru_RU.UTF-8
exec $DIR/DesktopEditors "$@"

View File

@ -0,0 +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
export LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH
+export LC_CTYPE=ru_RU.UTF-8
exec $DIR/ImageViewer "$@"

View File

@ -0,0 +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
export LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH
+export LC_CTYPE=ru_RU.UTF-8
exec $DIR/VideoPlayer "$@"

View File

@ -12,6 +12,7 @@ share/flyfm/templates/.source/new.xlsx
share/flyfm/templates/desktopeditors.docx.desktop
share/flyfm/templates/desktopeditors.pptx.desktop
share/flyfm/templates/desktopeditors.xlsx.desktop
share/pixmaps/r7-office.png
%%DATADIR%%/desktopeditors/3DPARTYLICENSE
%%DATADIR%%/desktopeditors/DesktopEditors
%%DATADIR%%/desktopeditors/LICENSE.htm