libreoffice-collabora: init at 24.04.5-4
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, fetchgit
|
||||
, fetchpatch2
|
||||
, lib
|
||||
, pam
|
||||
@@ -99,6 +100,7 @@
|
||||
, liborcus
|
||||
, libpng
|
||||
, langs ? [ "ar" "ca" "cs" "da" "de" "en-GB" "en-US" "eo" "es" "fi" "fr" "hu" "it" "ja" "ko" "nl" "pl" "pt" "pt-BR" "ro" "ru" "sk" "sl" "tr" "uk" "zh-CN" ]
|
||||
, withFonts ? false
|
||||
, withHelp ? true
|
||||
, kdeIntegration ? false
|
||||
, qtbase ? null
|
||||
@@ -143,7 +145,7 @@
|
||||
, sonnet ? null
|
||||
}:
|
||||
|
||||
assert builtins.elem variant [ "fresh" "still" ];
|
||||
assert builtins.elem variant [ "fresh" "still" "collabora" ];
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
@@ -222,7 +224,8 @@ let
|
||||
in stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libreoffice";
|
||||
inherit version;
|
||||
src = fetchurl srcsAttributes.main;
|
||||
|
||||
src = srcsAttributes.main { inherit fetchurl fetchgit; };
|
||||
|
||||
postUnpack = ''
|
||||
mkdir -v $sourceRoot/${tarballPath}
|
||||
@@ -231,6 +234,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
ln -sfv ${f} $sourceRoot/${tarballPath}/${f.md5name}
|
||||
ln -sfv ${f} $sourceRoot/${tarballPath}/${f.name}
|
||||
'')}
|
||||
'' + optionalString (variant != "collabora") ''
|
||||
|
||||
ln -sv ${srcs.help} $sourceRoot/${tarballPath}/${srcs.help.name}
|
||||
ln -svf ${srcs.translations} $sourceRoot/${tarballPath}/${srcs.translations.name}
|
||||
@@ -257,11 +261,14 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
./0001-Strip-away-BUILDCONFIG.patch
|
||||
# See above
|
||||
./skip-broken-tests-still.patch
|
||||
] ++ lib.optionals (variant == "fresh") [
|
||||
] ++ lib.optionals (variant == "fresh" || variant == "collabora") [
|
||||
# Revert part of https://github.com/LibreOffice/core/commit/6f60670877208612b5ea320b3677480ef6508abb that broke zlib linking
|
||||
./readd-explicit-zlib-link.patch
|
||||
# See above
|
||||
./skip-broken-tests-fresh.patch
|
||||
] ++ lib.optionals (variant == "collabora") [
|
||||
./fix-unpack-collabora.patch
|
||||
./skip-broken-tests-collabora.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@@ -473,7 +480,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
# Modified on every upgrade, though
|
||||
"--disable-odk"
|
||||
"--disable-firebird-sdbc"
|
||||
"--without-fonts"
|
||||
(lib.withFeature withFonts "fonts")
|
||||
"--without-doxygen"
|
||||
|
||||
# TODO: package these as system libraries
|
||||
@@ -534,7 +541,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
"--keep-going" # easier to debug test failures
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = optionalString (variant != "collabora") ''
|
||||
mkdir -p $out/share/icons
|
||||
|
||||
cp -r sysui/desktop/icons/hicolor $out/share/icons
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/solenv/gbuild/UnpackedTarball.mk
|
||||
+++ b/solenv/gbuild/UnpackedTarball.mk
|
||||
@@ -31,6 +31,7 @@ define gb_UnpackedTarget__command_unzip
|
||||
unzip \
|
||||
-qq \
|
||||
-d $(UNPACKED_DIR) $(UNPACKED_TARBALL) \
|
||||
+ && chmod -R u+r $(UNPACKED_DIR) \
|
||||
$(if $(filter-out 0,$(UNPACKED_STRIP_COMPONENTS)),\
|
||||
&& UNZIP_DIR=`ls $(UNPACKED_DIR)` \
|
||||
&& mv $(UNPACKED_DIR)/$$UNZIP_DIR/* $(UNPACKED_DIR) \
|
||||
@@ -9,6 +9,7 @@ of the input file, and writes the result to stdout.
|
||||
todo - Ideally we would move as much as possible into derivation dependencies.
|
||||
"""
|
||||
import collections, itertools, json, re, subprocess, sys, os
|
||||
import urllib.request, urllib.error
|
||||
|
||||
def main():
|
||||
|
||||
@@ -53,12 +54,29 @@ def main():
|
||||
|
||||
def construct_url(x):
|
||||
if x['brief']:
|
||||
return 'https://dev-www.libreoffice.org/src/{}{}'.format(
|
||||
url = 'https://dev-www.libreoffice.org/src/{}{}'.format(
|
||||
x.get('subdir', ''), x['tarball'])
|
||||
else:
|
||||
return 'https://dev-www.libreoffice.org/src/{}{}-{}'.format(
|
||||
url = 'https://dev-www.libreoffice.org/src/{}{}-{}'.format(
|
||||
x.get('subdir', ''), x['md5'], x['tarball'])
|
||||
|
||||
if x['name'].startswith('FONT_NOTO_') and not probe_url(url):
|
||||
return 'https://noto-website-2.storage.googleapis.com/pkgs/{}'.format(x['tarball'])
|
||||
|
||||
if x['name'] == 'FONT_OPENDYSLEXIC':
|
||||
return 'https://github.com/antijingoist/opendyslexic/releases/download/v0.91.12/{}'.format(x['tarball'])
|
||||
|
||||
return url
|
||||
|
||||
|
||||
def probe_url(url: str) -> bool:
|
||||
request = urllib.request.Request(url, method='HEAD')
|
||||
try:
|
||||
with urllib.request.urlopen(request) as response:
|
||||
return response.status == 200
|
||||
except urllib.error.HTTPError as e:
|
||||
return False
|
||||
|
||||
|
||||
def download(url, name, hash, hashtype):
|
||||
cmd = ['nix-prefetch-url', url, hash, '--print-path',
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
--- a/sc/Module_sc.mk
|
||||
+++ b/sc/Module_sc.mk
|
||||
@@ -69,8 +69,8 @@ endif
|
||||
|
||||
ifneq ($(DISABLE_GUI),TRUE)
|
||||
ifeq ($(OS),LINUX)
|
||||
+# CppunitTest_sc_tiledrendering hangs
|
||||
$(eval $(call gb_Module_add_check_targets,sc,\
|
||||
- CppunitTest_sc_tiledrendering \
|
||||
CppunitTest_sc_tiledrendering2 \
|
||||
))
|
||||
endif
|
||||
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
|
||||
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
|
||||
@@ -2948,6 +2948,8 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testHighlightNumbering_shd)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testPilcrowRedlining)
|
||||
{
|
||||
+ return;
|
||||
+
|
||||
// Load a document where the top left tile contains
|
||||
// paragraph and line break symbols with redlining.
|
||||
SwXTextDocument* pXTextDocument = createDoc("pilcrow-redlining.fodt");
|
||||
@@ -3057,6 +3059,8 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testDoubleUnderlineAndStrikeOut)
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testTdf43244_SpacesOnMargin)
|
||||
{
|
||||
+ return;
|
||||
+
|
||||
// Load a document where the top left tile contains
|
||||
// paragraph and line break symbols with redlining.
|
||||
SwXTextDocument* pXTextDocument = createDoc("tdf43244_SpacesOnMargin.odt");
|
||||
@@ -4100,6 +4104,8 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testRedlineTooltip)
|
||||
// toggling Formatting Marks on/off for one view should have no effect on other views
|
||||
CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testToggleFormattingMarks)
|
||||
{
|
||||
+ return;
|
||||
+
|
||||
SwXTextDocument* pXTextDocument = createDoc();
|
||||
int nView1 = SfxLokHelper::getView();
|
||||
|
||||
--- a/vcl/qa/cppunit/complextext.cxx
|
||||
+++ b/vcl/qa/cppunit/complextext.cxx
|
||||
@@ -529,6 +529,8 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testMixedCJKLatinScript_glyph_advanceme
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf107718)
|
||||
{
|
||||
+ return;
|
||||
+
|
||||
#if HAVE_MORE_FONTS
|
||||
#if !defined _WIN32 // TODO: Fails on jenkins but passes locally
|
||||
vcl::Font aFont(u"Source Han Sans"_ustr, u"Regular"_ustr, Size(0, 72));
|
||||
+1087
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
{ fetchgit, ... }:
|
||||
fetchgit {
|
||||
url = "https://gerrit.libreoffice.org/core";
|
||||
rev = "refs/tags/cp-24.04.5-4";
|
||||
hash = "sha256-27uLK1u8XWNigxZUCUu8nNZP3p5eFUsS2gCcfSYJK2k=";
|
||||
fetchSubmodules = true;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
"24.04.5-4"
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
{ fetchurl, ... }:
|
||||
fetchurl {
|
||||
sha256 = "03halzc9w4z8pfs8krpswp2qzrqq9rhnmms8v8ny88am87vy85lw";
|
||||
url = "https://download.documentfoundation.org/libreoffice/src/24.2.5/libreoffice-24.2.5.2.tar.xz";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
{ fetchurl, ... }:
|
||||
fetchurl {
|
||||
sha256 = "159vbv4zhibfd4xjdamcqs4h0p3h5y79kcjwrmshvjhs23p55l3m";
|
||||
url = "https://download.documentfoundation.org/libreoffice/src/7.6.7/libreoffice-7.6.7.2.tar.xz";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p python3 pup curl jq nix
|
||||
#!nix-shell -i bash -p python3 pup curl jq nix nix-prefetch-git
|
||||
|
||||
set -euo pipefail
|
||||
echoerr() { echo "$@" 1>&2; }
|
||||
@@ -14,6 +14,8 @@ if [[ $variant == fresh ]]; then
|
||||
head_tail=head
|
||||
elif [[ $variant == still ]]; then
|
||||
head_tail=tail
|
||||
elif [[ $variant == collabora ]]; then
|
||||
true
|
||||
else
|
||||
echoerr got unknown variant $variant
|
||||
exit 3
|
||||
@@ -26,49 +28,78 @@ shift
|
||||
mkdir -p "$(dirname $fname)/src-$variant"
|
||||
cd "$(dirname $fname)/src-$variant"
|
||||
|
||||
# The pup command prints both fresh and still versions one after another, and
|
||||
# we use either head -1 or tail -1 to get the right version, per the if elif
|
||||
# above.
|
||||
version_major="$(curl --silent https://www.libreoffice.org/download/download-libreoffice/ |\
|
||||
pup '.dl_version_number text{}' | $head_tail -1)"
|
||||
echoerr got from website ${variant}_version $version_major
|
||||
baseurl=https://download.documentfoundation.org/libreoffice/src/$version_major
|
||||
tarballs=($(curl --silent $baseurl/ |\
|
||||
pup 'table json{}' |\
|
||||
jq --raw-output '.. | .href? | strings' |\
|
||||
grep "$version_major.*.tar.xz$"))
|
||||
case $variant in
|
||||
(fresh|still)
|
||||
# The pup command prints both fresh and still versions one after another, and
|
||||
# we use either head -1 or tail -1 to get the right version, per the if elif
|
||||
# above.
|
||||
version_major="$(curl --silent https://www.libreoffice.org/download/download-libreoffice/ |\
|
||||
pup '.dl_version_number text{}' | $head_tail -1)"
|
||||
echoerr got from website ${variant}_version $version_major
|
||||
baseurl=https://download.documentfoundation.org/libreoffice/src/$version_major
|
||||
tarballs=($(curl --silent $baseurl/ |\
|
||||
pup 'table json{}' |\
|
||||
jq --raw-output '.. | .href? | strings' |\
|
||||
grep "$version_major.*.tar.xz$"))
|
||||
|
||||
full_version="$(echo ${tarballs[0]} | sed -e 's/^libreoffice-//' -e 's/.tar.xz$//')"
|
||||
echoerr full version is $full_version
|
||||
echo \"$full_version\" > version.nix
|
||||
full_version="$(echo ${tarballs[0]} | sed -e 's/^libreoffice-//' -e 's/.tar.xz$//')"
|
||||
echoerr full version is $full_version
|
||||
echo \"$full_version\" > version.nix
|
||||
|
||||
for t in help translations; do
|
||||
echo "{" > $t.nix
|
||||
echo " sha256 = "\"$(nix-prefetch-url $baseurl/libreoffice-$t-$full_version.tar.xz)'";' >> $t.nix
|
||||
echo " url = "\"$baseurl/libreoffice-$t-$full_version.tar.xz'";' >> $t.nix
|
||||
echo "}" >> $t.nix
|
||||
done
|
||||
for t in help translations; do
|
||||
echo "{" > $t.nix
|
||||
echo " sha256 = "\"$(nix-prefetch-url $baseurl/libreoffice-$t-$full_version.tar.xz)'";' >> $t.nix
|
||||
echo " url = "\"$baseurl/libreoffice-$t-$full_version.tar.xz'";' >> $t.nix
|
||||
echo "}" >> $t.nix
|
||||
done
|
||||
|
||||
# Out of loop nix-prefetch-url, because there is no $t, and we want the output
|
||||
# path as well, to get the download.lst file from there afterwards.
|
||||
main_path_hash=($(nix-prefetch-url --print-path $baseurl/libreoffice-$full_version.tar.xz))
|
||||
echo "{" > main.nix
|
||||
echo " sha256 = "\"${main_path_hash[0]}'";' >> main.nix
|
||||
echo " url = "\"$baseurl/libreoffice-$full_version.tar.xz'";' >> main.nix
|
||||
echo "}" >> main.nix
|
||||
echoerr got filename ${main_path_hash[1]}
|
||||
# Out of loop nix-prefetch-url, because there is no $t, and we want the output
|
||||
# path as well, to get the download.lst file from there afterwards.
|
||||
main_path_hash=($(nix-prefetch-url --print-path $baseurl/libreoffice-$full_version.tar.xz))
|
||||
echo "{ fetchurl, ...}:" > main.nix
|
||||
echo "fetchurl {" >> main.nix
|
||||
echo " sha256 = "\"${main_path_hash[0]}'";' >> main.nix
|
||||
echo " url = "\"$baseurl/libreoffice-$full_version.tar.xz'";' >> main.nix
|
||||
echo "}" >> main.nix
|
||||
echoerr got filename ${main_path_hash[1]}
|
||||
|
||||
# Environment variable required by ../generate-libreoffice-srcs.py
|
||||
export downloadList=/tmp/nixpkgs-libreoffice-update-download-$full_version.lst
|
||||
# Need to extract the file only if it doesn't exist, otherwise spare time be
|
||||
# skipping this.
|
||||
if [[ ! -f "$downloadList" ]]; then
|
||||
tar --extract \
|
||||
--file=${main_path_hash[1]} \
|
||||
libreoffice-$full_version/download.lst \
|
||||
-O > $downloadList
|
||||
else
|
||||
echoerr relying on previously downloaded downloadList file
|
||||
fi
|
||||
;;
|
||||
|
||||
(collabora)
|
||||
full_version=$(git ls-remote --tags --sort -v:refname https://gerrit.libreoffice.org/core | grep -Pom1 'refs/tags/cp-\K\d+\.\d+\.\d+-\d+$')
|
||||
echoerr full version is $full_version
|
||||
echo \"$full_version\" > version.nix
|
||||
|
||||
rev="refs/tags/cp-$full_version"
|
||||
|
||||
prefetch_output=$(nix-prefetch-git https://gerrit.libreoffice.org/core --rev "$rev" --fetch-submodules)
|
||||
fetched_git_path=$(echo "$prefetch_output" | jq -r '.path')
|
||||
hash=$(echo "$prefetch_output" | jq -r '.hash')
|
||||
|
||||
# Generate main.nix
|
||||
echo "{ fetchgit, ... }:" > main.nix
|
||||
echo "fetchgit {" >> main.nix
|
||||
echo " url = \"https://gerrit.libreoffice.org/core\";" >> main.nix
|
||||
echo " rev = \"$rev\";" >> main.nix
|
||||
echo " hash = \"$hash\";" >> main.nix
|
||||
echo " fetchSubmodules = true;" >> main.nix
|
||||
echo "}" >> main.nix
|
||||
|
||||
# Environment variable required by ../generate-libreoffice-srcs.py
|
||||
export downloadList="$fetched_git_path/download.lst"
|
||||
esac
|
||||
|
||||
# Environment variable required by ../generate-libreoffice-srcs.py
|
||||
export downloadList=/tmp/nixpkgs-libreoffice-update-download-$full_version.lst
|
||||
# Need to extract the file only if it doesn't exist, otherwise spare time be
|
||||
# skipping this.
|
||||
if [[ ! -f "$downloadList" ]]; then
|
||||
tar --extract \
|
||||
--file=${main_path_hash[1]} \
|
||||
libreoffice-$full_version/download.lst \
|
||||
-O > $downloadList
|
||||
else
|
||||
echoerr relying on previously downloaded downloadList file
|
||||
fi
|
||||
cd ..
|
||||
python3 ./generate-libreoffice-srcs.py > src-$variant/deps.nix
|
||||
|
||||
@@ -32024,6 +32024,11 @@ with pkgs;
|
||||
});
|
||||
libreoffice-still-unwrapped = libreoffice-still.unwrapped;
|
||||
|
||||
libreoffice-collabora = callPackage ../applications/office/libreoffice {
|
||||
variant = "collabora";
|
||||
withFonts = true;
|
||||
};
|
||||
|
||||
libresprite = callPackage ../applications/editors/libresprite {
|
||||
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Foundation;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user