Skip to content

Commit

Permalink
Add libreoffice-24.8
Browse files Browse the repository at this point in the history
Things to note
 * bash-binsh - configure has bashisms but is marked as /bin/sh
 * drop runtime depends, melange picks them up.
 * libnss is needed, dlopened at runtime.
 * see #31210 for more
   information on system-boost
  • Loading branch information
smoser committed Oct 19, 2024
1 parent a291672 commit 62d5da1
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 0 deletions.
178 changes: 178 additions & 0 deletions libreoffice-24.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
package:
name: libreoffice-24.8
version: 24.8.2.1
epoch: 0
description:
# https://www.libreoffice.org/about-us/licenses
copyright:
- license: GPL-3.0-only AND LGPL-3.0-only AND MPL-2.0
resources:
cpu: 65
memory: 32Gi
dependencies:
runtime:
- libnss
provides:
- libreoffice=${{package.full-version}}

vars:
python-version: 3.12
java-version: 17
java-home: /usr/lib/jvm/java-17-openjdk

environment:
contents:
packages:
- ant
- argon2-dev
- autoconf
- automake
- bash-binsh
- bison
- build-base
- busybox
- cairo-dev
- coreutils
- cups-dev
- curl
- curl-dev
- dbus-dev
- diffutils
- expat-dev
- flex
- fontconfig-dev
- freetype-dev
- fribidi-dev
- glib-dev
- gnutar
- gperf
- gpgme-dev
- gst-plugins-base-dev
- gstreamer-dev
- gtk-3-dev
- harfbuzz-dev
- krb5-dev
- libassuan-dev
- libatk-1.0
- libatk-bridge-2.0
- libcmis-dev
- libice-dev
- liblangtag-dev
- libnspr-dev
- libnss-dev
- libsm-dev
- libtool
- libx11-dev
- libxcomposite-dev
- libxcursor-dev
- libxdamage-dev
- libxft-dev
- libxml2-dev
- libxrandr-dev
- libxrender
- libxslt-dev
- libxt-dev
- libxtst-dev
- m4
- mesa
- mesa-dev
- mesa-egl
- mesa-gl
- nasm
- openjdk-${{vars.java-version}}
- openjdk-${{vars.java-version}}-default-jvm
- openssl-dev
- orc-dev
- pango-dev
- patch
- perl
- pkgconf
- pkgconf-dev
- py${{vars.python-version}}-setuptools # To fix `No module named 'distutils'` after bumping to python 3.12
- python-${{vars.python-version}}-dev
- zip
environment:
JAVA_HOME: ${{vars.java-home}}

pipeline:
- uses: git-checkout
with:
repository: https://github.com/LibreOffice/core
tag: libreoffice-${{package.version}}
expected-commit: 0f794b6e29741098670a3b95d60478a65d05ef13

# patch rather than cherry-pick. The git fetch of main takes multiple minutes.
- uses: patch
with:
patches: 0001-raptor-Use-without-www.patch

- runs: |
cat > autogen.input <<EOF
--with-jdk-home=$JAVA_HOME
--enable-python=system
--enable-split-debug
--prefix=/usr
--with-system-argon2
--with-system-libcmis
--with-system-expat
--with-system-gpgmepp
--with-system-liblangtag
--with-system-openssl
--with-system-cairo
--with-system-zlib
--with-system-curl
--host=${{host.triplet.gnu}}
--build=${{host.triplet.gnu}}
--without-junit
--without-galleries
EOF
./autogen.sh
sed -i 's/bootstrap: check-if-root/bootstrap: /g' Makefile.in
- runs: make -j$(nproc)

- uses: autoconf/make-install

- uses: strip

subpackages:
- name: ${{package.name}}-dev
pipeline:
- uses: split/dev

update:
enabled: true
ignore-regex-patterns:
- 'cp-*'
- 'co-*'
- 'cib-*'
- 'mimo-*'
github:
identifier: LibreOffice/core
use-tag: true
strip-prefix: libreoffice-
tag-filter-prefix: libreoffice-24.8

test:
environment:
contents:
packages:
- wolfi-base
pipeline:
- runs: |
/usr/lib/libreoffice/program/soffice.bin --help
- name: convert a csv to pdf
runs: |
set -- /usr/lib/libreoffice/program/soffice.bin --convert-to pdf my.csv
printf "#%s\n%s\n" "#dist,vulns,happiness" "wolfi,0,100" > my.csv
set -x
cat my.csv
# We do have to run this twice. The first time creates .config
# ~/.config/libreofficedev/ but then does nothing.
"$@" || echo "'$*' exited $? the first time. that is probably ok"
"$@" || {
echo "FAIL: '$*' exited $? the second time."
exit 1
}
[ -f my.pdf ] ||
{ echo "FAIL: Expected my.pdf file does not exist"; exit 1; }
36 changes: 36 additions & 0 deletions libreoffice-24.8/0001-raptor-Use-without-www.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 25b37b4c8c8c5aef7cd530d919258bd8e5dce068 Mon Sep 17 00:00:00 2001
From: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Wed, 3 Jul 2024 14:08:47 +0200
Subject: [PATCH] raptor: Use --without-www

it seems not used. Besides, it fails when upgrading
to libxml2 2.13.
See https://gerrit.libreoffice.org/c/core/+/169327

Change-Id: If383130eac3b5d6de911c4c273c8e371a4980f23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169933
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
---
external/redland/ExternalProject_raptor.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/external/redland/ExternalProject_raptor.mk b/external/redland/ExternalProject_raptor.mk
index 8ac05880766b..192bbade94e7 100644
--- a/external/redland/ExternalProject_raptor.mk
+++ b/external/redland/ExternalProject_raptor.mk
@@ -29,8 +29,8 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
$(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \
CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) $(gb_EMSCRIPTEN_CPPFLAGS)" \
$(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \
- --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \
- --with-www=xml \
+ --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \
+ --without-www \
--without-xslt-config \
$(gb_CONFIGURE_PLATFORMS) \
$(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \
--
2.47.0

0 comments on commit 62d5da1

Please sign in to comment.