aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Urankar <mikael@FreeBSD.org>2022-04-08 16:10:15 +0000
committerMikael Urankar <mikael@FreeBSD.org>2022-04-09 07:29:16 +0000
commit960d9357eca90f092e32b190ba7d8ecdf95a4e0c (patch)
tree1182f71adb58d45d703a2355c8f417f0317c38f5
parent2e392f04a4a3dbcc5d6ee1849912569c09189d59 (diff)
downloadports-960d9357eca90f092e32b190ba7d8ecdf95a4e0c.tar.gz
ports-960d9357eca90f092e32b190ba7d8ecdf95a4e0c.zip
www/onlyoffice-documentserver: Fix build after node 16.14.2 update and improve port
- Regen the distinfo after node 16.14.2 update - Fix for an hardcoded /usr/local in files/patch-core_Common_3dParty_icu_icu.pri - Don't chown in pkg-plist and documentserver-generate-allfonts.sh.m4, there is no rational to do that - Use a trigger to execute documentserver-generate-allfonts.sh and fix pkg-message accordingly PR: 263114
-rw-r--r--www/onlyoffice-documentserver/Makefile24
-rw-r--r--www/onlyoffice-documentserver/distinfo8
-rw-r--r--www/onlyoffice-documentserver/files/onlyoffice-documentserver.ucl.in9
-rw-r--r--www/onlyoffice-documentserver/files/patch-core_Common_3dParty_icu_icu.pri6
-rw-r--r--www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m48
-rw-r--r--www/onlyoffice-documentserver/files/pkg-message.in17
-rw-r--r--www/onlyoffice-documentserver/pkg-plist7
7 files changed, 43 insertions, 36 deletions
diff --git a/www/onlyoffice-documentserver/Makefile b/www/onlyoffice-documentserver/Makefile
index 3f1a044f6891..587ea9105446 100644
--- a/www/onlyoffice-documentserver/Makefile
+++ b/www/onlyoffice-documentserver/Makefile
@@ -5,12 +5,14 @@ PORTREVISION= 1
CATEGORIES= www
MASTER_SITES+= LOCAL/mikael/v8/:source1 \
LOCAL/mikael/onlyoffice/:source2 \
- https://nodejs.org/dist/v16.13.0/:source3 \
+ https://nodejs.org/dist/v${NODE_VERSION_PKGFETCH}/:source3 \
+ https://nodejs.org/dist/v${NODE_VERSION_PORTS}/:source3 \
SF/optipng/OptiPNG/optipng-0.7.7/:source4
DISTFILES+= v8-6.8.275.32_all.tar.gz:source1 \
v8-6.8.275.32_122aarch64.tar.gz:source1 \
v8-6.8.275.32_122amd64.tar.gz:source1 \
- node-v16.13.0.tar.gz:source3 \
+ node-v${NODE_VERSION_PKGFETCH}.tar.gz:source3 \
+ node-v${NODE_VERSION_PORTS}.tar.gz:source3 \
optipng-0.7.7.tar.gz:source4 \
onlyoffice-${DISTVERSION}-npm-cache.tar.gz:source2 \
@@ -38,7 +40,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}supervisor>0:sysutils/py-supervisor@${PY_FLA
webfonts>=0:x11-fonts/webfonts
USES= autoreconf:build dos2unix fakeroot gmake gnome iconv localbase nodejs:16,build pkgconfig \
- python:3.7+,build qt:5
+ python:3.7+,build qt:5 trigger
USE_QT= qmake_build
USE_GITHUB= yes
GH_ACCOUNT= ONLYOFFICE
@@ -97,6 +99,11 @@ SUB_LIST= ETCDIR=${ETCDIR} \
PREFIX=${PREFIX} \
WWWDIR=${WWWDIR}
+# node version used with "npm install pkg@5.5.1"
+NODE_VERSION_PKGFETCH= 16.13.0
+# node version used in the ports tree
+NODE_VERSION_PORTS= 16.14.2
+
MAKE_ENV= BUILD_NUMBER="1" \
PKG_CACHE_PATH=${WRKDIR}/.pkg-cache \
PRODUCT_VERSION="${DISTVERSION}"
@@ -115,10 +122,13 @@ post-extract:
@${MV} ${WRKDIR}/v8_obj_122${ARCH}/obj ${WRKSRC}/core/Common/3dParty/v8/v8/out.gn/freebsd_64
@${MKDIR} ${WRKDIR}/.pkg-cache/node
- @${CP} ${DISTDIR}/node-v16.13.0.tar.gz ${WRKDIR}/.pkg-cache/node
-# Checksum can be verified here: https://nodejs.org/dist/v16.13.0/SHASUMS256.txt
- @${ECHO} "9c00e5b6024cfcbc9105f9c58cf160762e78659a345d100c5bd80a7fb38c684f node-v16.13.0.tar.gz" > \
- ${WRKDIR}/.pkg-cache/node/node-v16.13.0.tar.gz.sha256sum
+ @${CP} ${DISTDIR}/node-v${NODE_VERSION_PKGFETCH}.tar.gz ${DISTDIR}/node-v${NODE_VERSION_PORTS}.tar.gz \
+ ${WRKDIR}/.pkg-cache/node
+# Checksum can be verified here: https://nodejs.org/dist/v${NODE_VERSION_PKGFETCH}/SHASUMS256.txt
+ @${ECHO} "9c00e5b6024cfcbc9105f9c58cf160762e78659a345d100c5bd80a7fb38c684f node-v${NODE_VERSION_PKGFETCH}.tar.gz" > \
+ ${WRKDIR}/.pkg-cache/node/node-v${NODE_VERSION_PKGFETCH}.tar.gz.sha256sum
+ @${ECHO} "082170f362c4da0e97f3a1899e3f5e4c998bbc245b803c77c6ab113a2b5cbd5f node-v${NODE_VERSION_PKGPORTS}.tar.gz" > \
+ ${WRKDIR}/.pkg-cache/node/node-v${NODE_VERSION_PORTS}.tar.gz.sha256sum
@${MKDIR} ${WRKSRC}/sdkjs-plugins/v1
@${CP} ${WRKSRC}/onlyoffice.github.io/sdkjs-plugins/v1/* ${WRKSRC}/sdkjs-plugins/v1
diff --git a/www/onlyoffice-documentserver/distinfo b/www/onlyoffice-documentserver/distinfo
index 72a41eed09d2..c5100056b982 100644
--- a/www/onlyoffice-documentserver/distinfo
+++ b/www/onlyoffice-documentserver/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1646292390
+TIMESTAMP = 1649399300
SHA256 (v8-6.8.275.32_all.tar.gz) = 9a62989b8965970c0cc67aef911b4937b822fe91a41e9d6977e797ed1326504b
SIZE (v8-6.8.275.32_all.tar.gz) = 65333304
SHA256 (v8-6.8.275.32_122aarch64.tar.gz) = c7311440b3d97a0caa41406de43fd77fc45f1c0f627cea8c54466a7ab78ca69a
@@ -7,10 +7,12 @@ SHA256 (v8-6.8.275.32_122amd64.tar.gz) = 78d13788f4e3608a7b6765621353aa9f334f549
SIZE (v8-6.8.275.32_122amd64.tar.gz) = 10328115
SHA256 (node-v16.13.0.tar.gz) = 9c00e5b6024cfcbc9105f9c58cf160762e78659a345d100c5bd80a7fb38c684f
SIZE (node-v16.13.0.tar.gz) = 63735070
+SHA256 (node-v16.14.2.tar.gz) = 082170f362c4da0e97f3a1899e3f5e4c998bbc245b803c77c6ab113a2b5cbd5f
+SIZE (node-v16.14.2.tar.gz) = 64999385
SHA256 (optipng-0.7.7.tar.gz) = 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452
SIZE (optipng-0.7.7.tar.gz) = 2329555
-SHA256 (onlyoffice-7.0.1.50-npm-cache.tar.gz) = cb61c61cb4e72fc6b18fe560d45c742b4c57ff0f971381db7b4407aaca371f54
-SIZE (onlyoffice-7.0.1.50-npm-cache.tar.gz) = 148399002
+SHA256 (onlyoffice-7.0.1.50-npm-cache.tar.gz) = 48824b1116f38aae29fe9a80ea495aba398d658555e55460d3774491028f4c19
+SIZE (onlyoffice-7.0.1.50-npm-cache.tar.gz) = 212890771
SHA256 (ONLYOFFICE-DocumentServer-v7.0.1.50-v7.0.1_GH0.tar.gz) = 1b5a529bc53c3e3d2c1502a610aa7670d9b2a470b41bc195964507b48726fc7d
SIZE (ONLYOFFICE-DocumentServer-v7.0.1.50-v7.0.1_GH0.tar.gz) = 52186
SHA256 (ONLYOFFICE-core-v7.0.1.50_GH0.tar.gz) = d4f0ba20e92e1e9286e43ccb48c540f324c540398720200a9eb9de875ac3794b
diff --git a/www/onlyoffice-documentserver/files/onlyoffice-documentserver.ucl.in b/www/onlyoffice-documentserver/files/onlyoffice-documentserver.ucl.in
new file mode 100644
index 000000000000..5c04e486af5d
--- /dev/null
+++ b/www/onlyoffice-documentserver/files/onlyoffice-documentserver.ucl.in
@@ -0,0 +1,9 @@
+path: [ "%%WWWDIR%%/documentserver/fonts", "%%PREFIX%%/share/fonts" ]
+trigger: {
+ type: lua
+ sandbox: false
+ script: <<EOS
+print("Running documentserver-generate-allfonts.sh to generate OnlyOffice fonts and themes...")
+pkg.exec("{%%PREFIX%%/bin/documentserver-generate-allfonts.sh}")
+EOS
+}
diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_icu_icu.pri b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_icu_icu.pri
index 2a4c67faef55..bdb28f03a010 100644
--- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_icu_icu.pri
+++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_icu_icu.pri
@@ -7,10 +7,10 @@
+}
+
+core_freebsd {
-+ INCLUDEPATH += /usr/local/include
++ INCLUDEPATH += %%LOCALBASE%%/include
+
-+ LIBS += /usr/local/lib/libicuuc.so
-+ LIBS += /usr/local/lib/libicudata.so
++ LIBS += %%LOCALBASE%%/lib/libicuuc.so
++ LIBS += %%LOCALBASE%%/lib/libicudata.so
}
core_linux {
diff --git a/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m4 b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m4
index 7e3a37f64f0a..9eeac55c164f 100644
--- a/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m4
+++ b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m4
@@ -1,15 +1,13 @@
--- document-server-package/common/documentserver/bin/documentserver-generate-allfonts.sh.m4.orig 2022-01-19 20:22:54 UTC
+++ document-server-package/common/documentserver/bin/documentserver-generate-allfonts.sh.m4
-@@ -20,9 +20,9 @@ echo -n Generating AllFonts.js, please wait...
+@@ -20,10 +20,6 @@ echo -n Generating AllFonts.js, please wait...
--output-web="$DIR/fonts"\
--use-system="true"
-chown -R ds:ds "$DIR/sdkjs"
-chown -R ds:ds "$DIR/server/FileConverter/bin"
-chown -R ds:ds "$DIR/fonts"
-+chown -R onlyoffice:onlyoffice "$DIR/sdkjs"
-+chown -R onlyoffice:onlyoffice "$DIR/server/FileConverter/bin"
-+chown -R onlyoffice:onlyoffice "$DIR/fonts"
-
+-
echo Done
+ echo -n Generating presentation themes, please wait...
diff --git a/www/onlyoffice-documentserver/files/pkg-message.in b/www/onlyoffice-documentserver/files/pkg-message.in
index 4c6e47700de4..82b882e1f770 100644
--- a/www/onlyoffice-documentserver/files/pkg-message.in
+++ b/www/onlyoffice-documentserver/files/pkg-message.in
@@ -59,20 +59,7 @@ files = %%ETCDIR%%/documentserver/supervisor/*.conf
- start nginx:
# service nginx start
-6. Generate fonts and presentation themes:
- # %%PREFIX%%/bin/documentserver-generate-allfonts.sh
-
-7. Follow the following doc If you want to use Onlyoffice with Nextcloud:
+6. Follow the following doc If you want to use Onlyoffice with Nextcloud:
- https://api.onlyoffice.com/editors/nextcloud
-8. Enjoy.
-
-EOM
-}
-{ type: upgrade
- message: <<EOM
-After each update, you have to generate the fonts and presentation themes:
- # %%PREFIX%%/bin/documentserver-generate-allfonts.sh
-EOM
-}
-]
+7. Enjoy.
diff --git a/www/onlyoffice-documentserver/pkg-plist b/www/onlyoffice-documentserver/pkg-plist
index 2d05668e1e33..1d5b13222f06 100644
--- a/www/onlyoffice-documentserver/pkg-plist
+++ b/www/onlyoffice-documentserver/pkg-plist
@@ -22856,6 +22856,8 @@ lib/libkernel_network.so
@dir %%WWWDIR%%/documentserver/web-apps/apps/presentationeditor/main/resources/img/load-mask
@dir %%WWWDIR%%/documentserver/web-apps/apps/spreadsheeteditor/main/resources/img/doc-formats
@dir %%WWWDIR%%/documentserver/web-apps/apps/spreadsheeteditor/main/resources/img/load-mask
+@owner onlyoffice
+@group onlyoffice
@dir /var/db/onlyoffice/documentserver/App_Data/cache/files
@dir /var/db/onlyoffice/documentserver/App_Data/cache
@dir /var/db/onlyoffice/documentserver/App_Data/docbuilder
@@ -22867,11 +22869,10 @@ lib/libkernel_network.so
@dir /var/log/onlyoffice/documentserver/metrics
@dir /var/log/onlyoffice/documentserver
@dir /var/log/onlyoffice
+@group
+@owner
@dir %%WWWDIR%%/Data
@dir %%WWWDIR%%/documentserver/fonts
-@postexec chown -R %%DS_USERNAME%%:%%DS_GROUPNAME%% /var/db/onlyoffice/documentserver
-@postexec chown -R %%DS_USERNAME%%:%%DS_GROUPNAME%% /var/log/onlyoffice/documentserver
-@postexec chown -R %%DS_USERNAME%%:%%DS_GROUPNAME%% %D/%%WWWDIR%%/documentserver
@postunexec rm -rf %D/%%WWWDIR%%/documentserver/fonts
@postunexec rm -rf %D/%%WWWDIR%%/documentserver/sdkjs/slide/themes/theme*
@postunexec rm -rf %D/%%WWWDIR%%/documentserver/sdkjs/common/Images/themes*