ports/contrib (3.6): [notify] libreoffice: changed dependencies: mysql -> mariadb; none (static pdfium) -> openjpeg2; reworked README.md

crux at crux.nu crux at crux.nu
Sat May 22 12:28:35 UTC 2021


commit 4b9b5eb6413b05ffdcf85819ba57b0a6de657281
Author: Tim Biermann <tbier at posteo.de>
Date:   Sat May 22 12:20:20 2021 +0000

    [notify] libreoffice: changed dependencies: mysql -> mariadb; none (static pdfium) -> openjpeg2; reworked README.md

diff --git a/libreoffice/.signature b/libreoffice/.signature
index 784890333..68af66053 100644
--- a/libreoffice/.signature
+++ b/libreoffice/.signature
@@ -1,6 +1,6 @@
 untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF39kmOVbHTN5o7BCXyCPCtRRdu1thXOK95iMEsqSpk6seFiwbYLis5Zhs/6iEyvemMQu90XyImlP/q3B5z3t4NAA=
-SHA256 (Pkgfile) = e173424a10b3c006b9f7d0273b720676a07c0bc2eb8ed07f06b0da5b92b103b4
+RWSagIOpLGJF33XQEkck7/oVxg3q5Ieiraf7If7GvopBfVIwf4TewKR15e5Q9BRGgMzlS3flqbQDPk5Gy9kuUhu2BTddJnYmlA0=
+SHA256 (Pkgfile) = 8cf02f9e39b66779bf45ec22414351ea00ea31d31ff9053ded0b514aab232184
 SHA256 (.footprint) = efdbc8f9e37a0fbaff8a9a82740e74bfdbbd49c23f1559b75bcc5dab03162799
 SHA256 (libreoffice-7.1.4.1.tar.xz) = c4f88f00833c4f9b00b722bcdb9219c9ea731f3543a55721e21568fb9a411d04
 SHA256 (libreoffice-dictionaries-7.1.4.1.tar.xz) = 2bb44ea2b808b9ba5238bd71c435f887cf3de8375cee23ac7f7e7e699206a70d
@@ -10,3 +10,4 @@ SHA256 (dtoa-20180411.tgz) = 0082d0684f7db6f62361b76c4b7faba19e0c7ce5cb8e36c4b65
 SHA256 (skia-m88-59bafeeaa7de9eb753e3778c414e01dcf013dcd8.tar.xz) = f293656a15342a53bb407b932fc907c6894178a162f09728bd383e24d84b1301
 SHA256 (pdfium-4306.tar.bz2) = eca406d47ac7e2a84dcc86f93c08f96e591d409589e881477fa75e488e4851d8
 SHA256 (makefile.in.patch) = e54f962e050cd1533cedf50d3deb3fbcec05c3253007f4240b94505320ebbbc6
+SHA256 (pdfium-use-system-libopenjpeg.diff) = 3c6a5683769c9367c2a81a64d39b627588d7557f00901098a9f86ec55ca6b6b1
diff --git a/libreoffice/Pkgfile b/libreoffice/Pkgfile
index bc413a059..3a94ded60 100644
--- a/libreoffice/Pkgfile
+++ b/libreoffice/Pkgfile
@@ -1,7 +1,7 @@
 # Description: LibreOffice is a powerful office suite
 # URL: https://www.libreoffice.org/
 # Maintainer: Tim Biermann, tbier at posteo dot de
-# Depends on: box2d clucene coin-or-mp fakeroot fontforge gpgme graphite2 gst-plugins-base gtk3 harfbuzz hyphen libabw libcdr libcmis libe-book libepubgen libetonyek libexttextcat libfreehand libmspub libmwaw libmythes libnumbertext libodfgen liborcus libpagemaker libqxp libstaroffice libtommath libvisio libwpg libwps libzmf lpsolve libqrcodegen mysql neon libpaper python3-lxml redland sane unzip xmlsec zip
+# Depends on: box2d clucene coin-or-mp fakeroot fontforge gpgme graphite2 gst-plugins-base hyphen libabw libcdr libcmis libe-book libepubgen libetonyek libexttextcat libfreehand libmspub libmwaw libmythes libnumbertext libodfgen liborcus libpagemaker libpaper libqrcodegen libqxp libstaroffice libtommath libvisio libwpg libwps libzmf lpsolve mariadb neon openjpeg2 python3-lxml redland sane unzip xmlsec zip
 # Optional: cups kio qt5 valgrind
 
 name=libreoffice
@@ -14,7 +14,8 @@ source=(https://downloadarchive.documentfoundation.org/libreoffice/old/$version/
   https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
   https://dev-www.libreoffice.org/src/dtoa-20180411.tgz
   https://dev-www.libreoffice.org/src/skia-m88-59bafeeaa7de9eb753e3778c414e01dcf013dcd8.tar.xz
-  https://dev-www.libreoffice.org/src/pdfium-$pdfiumversion.tar.bz2 makefile.in.patch)
+  https://dev-www.libreoffice.org/src/pdfium-$pdfiumversion.tar.bz2
+  makefile.in.patch pdfium-use-system-libopenjpeg.diff)
 
 unpack_source() {
   for file in ${source[@]}; do
@@ -46,6 +47,8 @@ build() {
   cd $name-$version
 
   patch -Np1 -i $SRC/makefile.in.patch
+  # https://sources.debian.org/patches/libreoffice/1:7.1.4%7Erc1-1/pdfium-use-system-libopenjpeg.diff/
+  patch -Np1 -i $SRC/pdfium-use-system-libopenjpeg.diff
 
   find -L . \
      \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
diff --git a/libreoffice/README b/libreoffice/README
deleted file mode 100644
index dd3eaa64d..000000000
--- a/libreoffice/README
+++ /dev/null
@@ -1,2 +0,0 @@
-If you have harfbuzz and harfbuzz-icu installed (`prt-get isinst harfbuzz harfbuzz-icu`) already, you need to rebuild it with graphite2 support
-    * prt-get depinst graphite2 ; prt-get update -fr harfbuzz harfbuzz-icu
diff --git a/libreoffice/README.md b/libreoffice/README.md
new file mode 100644
index 000000000..e0b3984f8
--- /dev/null
+++ b/libreoffice/README.md
@@ -0,0 +1,25 @@
+# contrib/libreoffice README.md
+
+# Dependencies
+
+## harfbuzz-icu
+`contrib/libreoffice` will need `opt/harfbuzz` with `opt/icu` and
+`contrib/graphite2` support around, both are optional dependencies for
+that port. If things don't work, try to check if this chain is installed
+and properly rebuild to make use of each other:
+
+```sh
+prt-get isinst graphite2 && \
+prt-get isinst icu && \
+prt-get update -fr harfbuzz || \
+echo "please install graphite2 and icu first"
+```
+
+## xmlsec and nss support
+
+Again, `contrib/xmlsec` will depend on another optional port, `opt/nss`.
+Check the following chain:
+```sh
+prt-get isinst nss && prt-get update -fr xmlsec || \
+echo "please install nss before you attempt to rebuild xmlsec"
+```
diff --git a/libreoffice/pdfium-use-system-libopenjpeg.diff b/libreoffice/pdfium-use-system-libopenjpeg.diff
new file mode 100644
index 000000000..0bd9a5573
--- /dev/null
+++ b/libreoffice/pdfium-use-system-libopenjpeg.diff
@@ -0,0 +1,64 @@
+diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
+index f08ff51a31a3..5536bde5e4f7 100644
+--- a/external/pdfium/Library_pdfium.mk
++++ b/external/pdfium/Library_pdfium.mk
+@@ -19,6 +19,8 @@ $(eval $(call gb_Library_set_include,pdfium,\
+     -I$(call gb_UnpackedTarball_get_dir,pdfium) \
+     -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party \
+     -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/agg23 \
++    -isystem/usr/include/openjpeg-2.3 \
++    -isystem/usr/include/openjpeg-2.4 \
+     $$(INCLUDE) \
+ ))
+ 
+@@ -26,6 +28,7 @@ $(eval $(call gb_Library_add_defs,pdfium,\
+     -DFPDF_IMPLEMENTATION \
+     -DUSE_SYSTEM_LCMS2 \
+     -DUSE_SYSTEM_LIBJPEG \
++    -DUSE_SYSTEM_LIBOPENJPEG2 \
+     -DUSE_SYSTEM_ZLIB \
+     -DUSE_SYSTEM_ICUUC \
+     -DMEMORY_TOOL_REPLACES_ALLOCATOR \
+@@ -520,34 +523,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+     UnpackedTarball/pdfium/third_party/agg23/agg_vcgen_stroke \
+ ))
+ 
+-# third_party/fx_libopenjpeg
+-$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/bio \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/cio \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/dwt \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/event \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/function_list \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/image \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/invert \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/j2k \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/jp2 \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/mct \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/mqc \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/openjpeg \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_clock \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/pi \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/thread \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/t1 \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/sparse_array \
+-))
+-
+-$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+-    UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_malloc \
+-))
+-
+ # pdfium_base
+ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+     UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization \
+@@ -581,6 +556,7 @@ ifneq (,$(filter LINUX ANDROID,$(OS)))
+ $(eval $(call gb_Library_add_libs,pdfium,\
+     -ldl \
+     -lrt \
++    -lopenjp2 \
+ ))
+ 
+ $(eval $(call gb_Library_use_external,pdfium,freetype))


More information about the CRUX mailing list