user/zotero: upgrade to 7.0.0_beta76, add check
This commit is contained in:
parent
7a6e398a09
commit
dd4806d73f
4 changed files with 106 additions and 17 deletions
|
@ -1,9 +1,9 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=zotero
|
||||
pkgver=7.0.0_beta74
|
||||
pkgrel=1
|
||||
_fxver=115.10.0
|
||||
pkgver=7.0.0_beta76
|
||||
pkgrel=0
|
||||
_fxver=115.9.1
|
||||
_gittag=$pkgver
|
||||
# Date of release, YY-MM-DD for metainfo file (see package())
|
||||
# https://www.mozilla.org/firefox/organizations/notes/
|
||||
|
@ -14,7 +14,6 @@ url="https://www.mozilla.org/en-US/firefox/organizations/"
|
|||
# armhf: build failure on armhf due to wasm
|
||||
arch="x86_64 armv7 aarch64 x86 ppc64le"
|
||||
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
|
||||
options="!check" # No test suite
|
||||
depends="
|
||||
ffmpeg-libavcodec
|
||||
"
|
||||
|
@ -66,6 +65,7 @@ makedepends="
|
|||
unzip
|
||||
wasi-sdk
|
||||
wireless-tools-dev
|
||||
xvfb-run
|
||||
zip
|
||||
"
|
||||
source="https://ftp.mozilla.org/pub/firefox/releases/${_fxver}esr/source/firefox-${_fxver}esr.source.tar.xz
|
||||
|
@ -96,6 +96,9 @@ source="https://ftp.mozilla.org/pub/firefox/releases/${_fxver}esr/source/firefox
|
|||
https://lab.ilot.io/mirrors/zotero-client/-/releases/$_gittag/downloads/tarball/zotero-client-$_gittag.tar.gz
|
||||
zotero_build-modifications.patch
|
||||
zotero_drop-phantomjs.patch
|
||||
zotero_test-drop-build.patch
|
||||
zotero_test-fix-chars.patch
|
||||
zotero_test-push-timeout-to-30sec.patch
|
||||
"
|
||||
|
||||
builddir="$srcdir"/firefox-$_fxver
|
||||
|
@ -140,9 +143,26 @@ export CFLAGS="${CFLAGS/-fstack-clash-protection/} -g0 -O2"
|
|||
export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/} -g0 -O2 -Wno-deprecated-builtins -Wno-deprecated-declarations"
|
||||
|
||||
prepare() {
|
||||
# moves zotero source to mozilla source
|
||||
# zotero prepare
|
||||
mv "$_zoterodir" "$builddir"/zotero
|
||||
(
|
||||
cd "$builddir"/zotero
|
||||
|
||||
# checks that we're using expected fx version
|
||||
local _exp_fxver=$(grep GECKO_VERSION_LINUX "$builddir"/zotero/app/config.sh | sed 's|.*=||' | tr -d '"' | sed 's|esr||')
|
||||
if [ "$_fxver" != "$_exp_fxver" ]; then
|
||||
msg "Expected firefox version $_exp_fxver, got $_fxver"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# zotero build expects to be in a git repo
|
||||
git init
|
||||
git commit --allow-empty -m 'Initial'
|
||||
|
||||
npm i --legacy-peer-deps
|
||||
)
|
||||
default_prepare
|
||||
|
||||
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
|
||||
|
||||
_clear_vendor_checksums audio_thread_priority
|
||||
|
@ -247,14 +267,6 @@ prepare() {
|
|||
$sandbox
|
||||
$webrtc_config
|
||||
EOF
|
||||
|
||||
# zotero prepare
|
||||
(
|
||||
cd "$builddir"/zotero
|
||||
# zotero build expects to be in a git repo
|
||||
git init
|
||||
git commit --allow-empty -m 'Initial'
|
||||
)
|
||||
}
|
||||
|
||||
build() {
|
||||
|
@ -300,17 +312,39 @@ build() {
|
|||
# zotero build
|
||||
(
|
||||
cd "$builddir"/zotero
|
||||
npm i --legacy-peer-deps
|
||||
NODE_OPTIONS=--openssl-legacy-provider npm run build
|
||||
|
||||
SKIP_32=1 app/scripts/dir_build -p l
|
||||
# move to seperate folder as check will rebuild with test files added
|
||||
mv "$builddir"/zotero/app/staging "$builddir"/zotero/app/package
|
||||
)
|
||||
|
||||
rm -R "$builddir"/zotero/app/xulrunner/firefox # clean-up unused firefox install
|
||||
}
|
||||
|
||||
check() {
|
||||
# install to where zotero expects it
|
||||
DESTDIR="$builddir"/zotero/app/xulrunner/firefox ./mach install
|
||||
mv "$builddir"/zotero/app/xulrunner/firefox/usr/lib/firefox-esr/* "$builddir"/zotero/app/xulrunner/firefox/.
|
||||
rm -R "$builddir"/zotero/app/xulrunner/firefox/usr
|
||||
|
||||
# zotero test build
|
||||
(
|
||||
cd "$builddir"/zotero
|
||||
ZOTERO_TEST=1 SKIP_32=1 app/scripts/dir_build -p l
|
||||
|
||||
)
|
||||
|
||||
# test-suite is not very stable, false failure occur from time to time, thus never fails
|
||||
CI=true LD_LIBRARY_PATH="$builddir"/zotero/app/staging/Zotero_linux xvfb-run "$builddir"/zotero/test/runtests.sh -x "$builddir"/zotero/app/staging/Zotero_linux/zotero || true
|
||||
|
||||
rm -R "$builddir"/zotero/app/xulrunner/firefox # clean-up unused firefox install
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dDm755 "$pkgdir"/usr/bin
|
||||
install -dDm755 "$pkgdir"/usr/lib/zotero
|
||||
cp -r "$builddir"/zotero/app/staging/Zotero_linux/* "$pkgdir/usr/lib/zotero"
|
||||
cp -r "$builddir"/zotero/app/package/Zotero_linux/* "$pkgdir/usr/lib/zotero"
|
||||
ln -s /usr/lib/zotero/zotero "$pkgdir/usr/bin/zotero"
|
||||
install -Dm644 "$srcdir/zotero.desktop" "$pkgdir/usr/share/applications/zotero.desktop"
|
||||
|
||||
|
@ -324,7 +358,7 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
0626e2c68ce43f24dfc2b9216e2565537ad8781daf4195d53420e1b78d57d0f6360fbe56b0ddbedae3818546c72472c85c1ff2b208c123d32a0543e666f42b65 firefox-115.10.0esr.source.tar.xz
|
||||
9ccaede2fcda13a07f98a2110bb8f99c7324601d66bff311f3070a669576a1598fe1d7de2d005d725d1f44dbe3934a9c0fd0b7950f60686047d4ce8d9d812310 firefox-115.9.1esr.source.tar.xz
|
||||
3e0501ae7a650346c667dfdc0ae0ca286084f22e89ab2ac671cc0d7315673dc5b6dcb9f9882f6f39d26e9a31e57f7a0fd53d6b805e520224e22b8976850e2eb8 audio-lfs64.patch
|
||||
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
|
||||
f7b3b45ba04d05d17439d009bf0c9f27881e126f424e2257552338a0c1e3771ee1289c044babcb0920f62af62873a268c0cf524e1d35711e6dc8b808ca5e9f26 esr-metainfo.patch
|
||||
|
@ -346,7 +380,10 @@ d354f48a29bfc16719f3b230b1395063239d4420f9e47522de4662392d9697b15f931ca3bf6055d1
|
|||
382510375b1a2fa79be0ab79e3391a021ae2c022429ffbaa7e7a69166f99bb56d01e59a1b10688592a29238f21c9d6977672bd77f9fae439b66bdfe0c55ddb15 mozilla-location.keys
|
||||
fc45bc3ffb9404e5338ea26a9f04807b40f6f516324972cddd48bedb91b8bd7c6b8d4e03a0209020f5e67b703bc4ff89389985791b9bd544a0fc3951e2dc338e vendor-prefs.js
|
||||
e1a0a4ff5cc1b53f13776ca11927d671426b0691e78e74a4adf2166d57bb2ae8ac409cc11a37ce5e2f680fdf05d5bc3849c33a9717aca1bb62d03ae5231a67fb zotero.desktop
|
||||
0d33924c32271f22abd91a9a2e151cc920faa03a84f3f0ebb70d00e20d28f44915fcc9c2d1168ab10a866dc6cf23be7ef124d2c3a94406188f44ee323e44a863 zotero-client-7.0.0_beta74.tar.gz
|
||||
e8442e68c53d0057947e4abb4d7ab2f4d52dbb88372d362006c43780d65cae1fe579ab167c772d36113c7937c296b7e4306027319757fb0d36f76a851be6e0e3 zotero-client-7.0.0_beta76.tar.gz
|
||||
746dbabbb3ea9199d17891e2079b9256d04843f548132178862117d2334694d98e2cc981945d72f31d0e5b2c42904d371633f6905996bb580aa0b5ae95c64ddc zotero_build-modifications.patch
|
||||
cfe583f2da7508a4e07734a42519d7c28265928fe14c14b2f650ca6e56c35cb79272b03ed3bfb81e06c4e01458b55e04d10df5cbdd549da0d97206b2c10c3530 zotero_drop-phantomjs.patch
|
||||
337070ee4c44ccb35c6b6290c18327740bb9fccfd1a6ad1045782e83daa290b6ced7d53955d3a889f661d588738a64f2e7f383639f4c46be9fdf891168abc9ff zotero_test-drop-build.patch
|
||||
f0e4f09496531222e8400959f9ef12852bca269eb3bf4c3b87ccaf92f28a12b9374461a1c79ad294a4393dbe30800aa1c85497033d0bc304fa8c198dfab3efd2 zotero_test-fix-chars.patch
|
||||
9dc390d8bae42e645cae45fe5551751d8f38d5c1b8b2cc0eec1c2191f4bde293ffb2c67cfc4de765f2d48b1da4d5fcd4f1c03711e5da3180cd1b63710ccf5599 zotero_test-push-timeout-to-30sec.patch
|
||||
"
|
||||
|
|
23
user/zotero/zotero_test-drop-build.patch
Normal file
23
user/zotero/zotero_test-drop-build.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
diff --git a/zotero/test/runtests.sh.orig b/zotero/test/runtests.sh
|
||||
index d83914a..ec91848 100755
|
||||
--- a/zotero/test/runtests.sh.orig
|
||||
+++ b/zotero/test/runtests.sh
|
||||
@@ -154,18 +154,6 @@ fi
|
||||
# Clean up on exit
|
||||
trap "{ rm -rf \"$TEMPDIR\"; }" EXIT
|
||||
|
||||
-# Check if build watch process is running
|
||||
-# If not, run now
|
||||
-if [[ -z "$CI" ]] && ! ps | grep js-build/build.js | grep -v grep > /dev/null; then
|
||||
- echo
|
||||
- echo "Running JS build process"
|
||||
- cd "$ROOT_DIR"
|
||||
- NODE_OPTIONS=--openssl-legacy-provider npm run build || exit $?
|
||||
- echo
|
||||
-fi
|
||||
-
|
||||
-ZOTERO_TEST=1 "$ROOT_DIR/app/scripts/dir_build" -q
|
||||
-
|
||||
makePath FX_PROFILE "$PROFILE"
|
||||
MOZ_NO_REMOTE=1 NO_EM_RESTART=1 "$Z_EXECUTABLE" -profile "$FX_PROFILE" \
|
||||
-test "$TESTS" -grep "$GREP" -ZoteroTest $Z_ARGS
|
16
user/zotero/zotero_test-fix-chars.patch
Normal file
16
user/zotero/zotero_test-fix-chars.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff --git a/zotero/node_modules/mocha/mocha.js.orig b/zotero/node_modules/mocha/mocha.js
|
||||
index c3e0c12..95fff4d 100644
|
||||
--- a/zotero/node_modules/mocha/mocha.js.orig
|
||||
+++ b/zotero/node_modules/mocha/mocha.js
|
||||
@@ -11473,9 +11473,9 @@
|
||||
|
||||
var browser$1 = {
|
||||
info: 'ℹ️',
|
||||
- success: '✅',
|
||||
+ success: '✔',
|
||||
warning: '⚠️',
|
||||
- error: '❌️'
|
||||
+ error: 'x'
|
||||
};
|
||||
|
||||
var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events)
|
13
user/zotero/zotero_test-push-timeout-to-30sec.patch
Normal file
13
user/zotero/zotero_test-push-timeout-to-30sec.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/zotero/test/runtests.sh.orig b/zotero/test/runtests.sh
|
||||
index d83914a3baa..e00efdb6506 100755
|
||||
--- a/zotero/test/runtests.sh.orig
|
||||
+++ b/zotero/test/runtests.sh
|
||||
@@ -146,7 +146,7 @@ user_pref("extensions.zoteroOpenOfficeIntegration.skipInstallation", true);
|
||||
EOF
|
||||
|
||||
if [ -n "$CI" ]; then
|
||||
- Z_ARGS="$Z_ARGS -ZoteroAutomatedTest -ZoteroTestTimeout 15000"
|
||||
+ Z_ARGS="$Z_ARGS -ZoteroAutomatedTest -ZoteroTestTimeout 30000"
|
||||
else
|
||||
Z_ARGS="$Z_ARGS -jsconsole"
|
||||
fi
|
Loading…
Reference in a new issue