From 5f506101d00b272f899d91ccf7a40c66f7bd68e2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 25 Jan 2021 10:23:46 +0100 Subject: [PATCH] Flatpak build: Java is no longer in the f33 flatpak-runtime ...so configure.ac would mis-determine JAVA_HOME as /app, would add -I/app/include -I/app/include/linux to SOLARINC, and #include would not be found. At libreoffice flatpak build time, the java-11-openjdk rpm will populate /etc/alternatives (even though that is outside /app) with symlinks to /app/lib/jvm, so that the symlink chain /app/lib/jvm/java -> /etc/alternatives/java_sdk/ -> /app/lib/jvm/java-11-openjdk-11.0.9.11-9.module+f33+3+4101bf32.x86_64/ (or whatever the latter's exact name) will work. (At flatpak composition time, those non-/app files will be dropped from the resulting flatpak, so that container.yaml needs to set up the /app/lib/jvm/jre-flatpak symlink for --env=JAVA_HOME=/app/lib/jvm/jre-flatpak to find the Java installation under a stable name, as then the /app/lib/jvm/jre -> /etc/alternatives/jre/ symlink will be dangling.) --- libreoffice.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libreoffice.spec b/libreoffice.spec index 3b7b539..c8ccb96 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1088,7 +1088,7 @@ SMP_MFLAGS=%{?_smp_mflags} SMP_MFLAGS=$[${SMP_MFLAGS/-j/}] %if 0%{?flatpak} -%global flatpakoptions --with-beanshell-jar=/app/share/java/bsh.jar --with-commons-logging-jar=/app/share/java/commons-logging.jar --with-external-dict-dir=/app/share/myspell --with-external-hyph-dir=/app/share/hyphen --with-external-thes-dir=/app/share/mythes --with-flute-jar=/app/share/java/flute.jar --with-jfreereport-jar=/app/share/java/flow-engine.jar --with-libbase-jar=/app/share/java/libbase.jar --with-libfonts-jar=/app/share/java/libfonts.jar --with-libformula-jar=/app/share/java/libformula.jar --with-liblayout-jar=/app/share/java/liblayout.jar --with-libloader-jar=/app/share/java/libloader.jar --with-librepository-jar=/app/share/java/librepository.jar --with-libserializer-jar=/app/share/java/libserializer.jar --with-libxml-jar=/app/share/java/libxml.jar --with-sac-jar=/app/share/java/sac.jar FIREBIRDCONFIG=%{_libdir}/fb_config QT4INC=%{_includedir} +%global flatpakoptions --with-beanshell-jar=/app/share/java/bsh.jar --with-commons-logging-jar=/app/share/java/commons-logging.jar --with-external-dict-dir=/app/share/myspell --with-external-hyph-dir=/app/share/hyphen --with-external-thes-dir=/app/share/mythes --with-flute-jar=/app/share/java/flute.jar --with-jdk-home=/app/lib/jvm/java --with-jfreereport-jar=/app/share/java/flow-engine.jar --with-libbase-jar=/app/share/java/libbase.jar --with-libfonts-jar=/app/share/java/libfonts.jar --with-libformula-jar=/app/share/java/libformula.jar --with-liblayout-jar=/app/share/java/liblayout.jar --with-libloader-jar=/app/share/java/libloader.jar --with-librepository-jar=/app/share/java/librepository.jar --with-libserializer-jar=/app/share/java/libserializer.jar --with-libxml-jar=/app/share/java/libxml.jar --with-sac-jar=/app/share/java/sac.jar FIREBIRDCONFIG=%{_libdir}/fb_config QT4INC=%{_includedir} %if 0%{?rhel} %global flatpakoptions %{flatpakoptions} --with-boost-libdir=%{_libdir} %endif