Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libreoffice-collabora: init at 24.04.5-4 #329525

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions pkgs/applications/office/libreoffice/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ stdenv
, fetchurl
, fetchgit
, fetchpatch2
, lib
, pam
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -143,7 +145,7 @@
, sonnet ? null
}:

assert builtins.elem variant [ "fresh" "still" ];
assert builtins.elem variant [ "fresh" "still" "collabora" ];

let
inherit (lib)
Expand Down Expand Up @@ -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}
Expand All @@ -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}
Expand All @@ -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 = ''
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions pkgs/applications/office/libreoffice/fix-unpack-collabora.patch
Original file line number Diff line number Diff line change
@@ -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) \
22 changes: 20 additions & 2 deletions pkgs/applications/office/libreoffice/generate-libreoffice-srcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
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():

Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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));
Loading
Loading