libreoffice: don't download stuff during build

* --disable-dependency-tracking should speed things up a little.
* Enable logging.
* Initial logic for galleries and translations packages.
* Use correct Haiku settings paths.
This commit is contained in:
Kacper Kasper
2018-08-05 22:03:03 +02:00
parent dfa00eba20
commit eda262cd44
2 changed files with 164 additions and 14 deletions

View File

@@ -17,11 +17,15 @@ and Open Source office suite on the market:
HOMEPAGE="https://www.libreoffice.org/"
COPYRIGHT="2000-2018 LibreOffice contributors"
LICENSE="MPL v2.0"
REVISION="13"
REVISION="14"
COMMIT="1c56d5fec2ddd9f68aaaf21e9dbe287db893c092"
SOURCE_URI="https://github.com/LibreOffice/core/archive/$COMMIT.tar.gz"
CHECKSUM_SHA256="8ead56edb57384bf6f18331566a6d52a04d97bfd9e52e139925b8f6224d84b20"
SOURCE_DIR="core-$COMMIT"
#COMMIT_2="54cc0de67b3c948411cef3a0405c8992d80f34f3"
#SOURCE_URI_2="https://github.com/LibreOffice/translations/archive/$COMMIT_2.tar.gz"
#CHECKSUM_SHA256_2="5677ff6b362240e1741559b86057aeecda88030940f0d2dcb201d518c7f945c9"
#SOURCE_DIR_2="translations-$COMMIT_2"
PATCHES="libreoffice-$portVersion.patchset"
ADDITIONAL_FILES="libreoffice.rdef.in"
@@ -123,6 +127,20 @@ REQUIRES="
lib:libzmf_0.0$secondaryArchSuffix
"
#PROVIDES_galleries="
# libreoffice${secondaryArchSuffix}_galleries = $portVersion
# "
#REQUIRES_galleries="
# libreoffice$secondaryArchSuffix == $portVersion base
#"
#
#PROVIDES_lang="
# libreoffice${secondaryArchSuffix}_lang = $portVersion
# "
#REQUIRES_lang="
# libreoffice$secondaryArchSuffix == $portVersion base
#"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
glm${secondaryArchSuffix}_devel
@@ -196,6 +214,7 @@ BUILD_PREREQUIRES="
cmd:bison
cmd:find
cmd:flex
cmd:fontforge$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:genbrk
cmd:genccode
@@ -220,15 +239,23 @@ BUILD_PREREQUIRES="
BUILD()
{
# TODO: enable commented out stuff when there is a "stable" release
# currently there are too many things in flux to waste space
# rename $sourceDir to something shorter, otherwise build fails with
# execv: Argument too big /sources/core/sw/Library_sw.mk:20
cd .. ; mv $sourceDir core
ln -s core core-$COMMIT; cd core
#rm -rf translations
#ln -s $sourceDir2 translations
pkgconfig_libdir="`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/pkgconfig"
pkgconfig_datadir="`finddir B_SYSTEM_DIRECTORY`/$relativeDataDir/pkgconfig"
export PKG_CONFIG_LIBDIR="$pkgconfig_libdir:$pkgconfig_datadir"
#--enable-symbols \
#--with-lang=ALL
runConfigure ./autogen.sh \
--with-distro=LibreOfficeHaiku \
--enable-kde5 \
@@ -236,6 +263,8 @@ BUILD()
--enable-release-build \
--enable-readonly-installset \
--enable-python=no \
--enable-build-opensymbol \
--enable-sal-log \
\
--disable-ccache \
--disable-cups \
@@ -246,7 +275,10 @@ BUILD()
--disable-randr \
--disable-sdremote \
--disable-fetch-external \
--disable-dependency-tracking \
\
--with-galleries=no \
--with-fonts=no \
--with-vendor="HaikuPorts" \
--with-system-boost \
--with-boost-libdir=`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir \
@@ -313,13 +345,38 @@ BUILD()
INSTALL()
{
mkdir -p $appsDir/LibreOffice
cp -r ../core/instdir/* $appsDir/LibreOffice
cd $appsDir/LibreOffice/program
mv soffice.bin LibreOffice
appDir=$appsDir/LibreOffice
mkdir -p $appDir
cp -r ../core/instdir/* $appDir
mv $appDir/program/soffice.bin $appDir/program/LibreOffice
# make sure we do not copy default profile
rm -rf ../user
rm -rf $appDir/user
rm -rf $appDir/share/xdg
# packageEntries galleries \
# $appDir/share/gallery $appDir/presets/gallery
#
# langs=`ls $appDir/program/resource`
# declare -a files
# declare -a filesToPackage
# for lang in $langs; do
# files=("${files[@]}" "$appDir/program/resource/$lang")
# files=("${files[@]}" "$appDir/share/autotext/$lang")
# files=("${files[@]}" "$appDir/share/autocorr/$lang")
# files=("${files[@]}" "$appDir/share/registry/res/registry_$lang.xcd")
# files=("${files[@]}" "$appDir/share/registry/res/fcfg_langpack_$lang.xcd")
# files=("${files[@]}" "$appDir/share/registry/Langpack_$lang.xcd")
# files=("${files[@]}" "$appDir/readme/README_$lang")
# for f in $files; do
# if [ -f $f ]; then
# filesToPackage=("${filesToPackage[@]}" "$f")
# fi
# done
# done
#
# packageEntries lang ${filesToPackage[@]}
local APP_SIGNATURE="application/x-vnd.LibreOffice"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
@@ -336,6 +393,6 @@ INSTALL()
$sourceDir/../core/libreoffice.rdef
addResourcesToBinaries $sourceDir/../core/libreoffice.rdef \
$appsDir/LibreOffice/program/LibreOffice
addAppDeskbarSymlink $appsDir/LibreOffice/program/LibreOffice
$appDir/program/LibreOffice
addAppDeskbarSymlink $appDir/program/LibreOffice
}

View File

@@ -1,4 +1,4 @@
From 440de18f647d1bd4283277f220f2bb00312a3ed6 Mon Sep 17 00:00:00 2001
From 1908e29a8baed25845534a42123a7eb5b8a2c8d4 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 1 Jun 2018 15:23:47 +0300
Subject: Fix make distro-pack-install on Haiku
@@ -39,7 +39,7 @@ index 9936b0e..4193e55 100644
2.16.4
From 8c67df59467dc3bc0352c194c764f9d8d8d3756b Mon Sep 17 00:00:00 2001
From c81878788cd5d92c927c0be692e33cf0729d67f5 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Mon, 4 Jun 2018 11:55:30 +0300
Subject: Fix profile dir location on Haiku
@@ -62,7 +62,7 @@ index ebeb00d..da4f697 100644
2.16.4
From cfa12d272f5e67de45cbc7430f68c26dfb1fcf08 Mon Sep 17 00:00:00 2001
From a6d90e87853dfafc06336b02599af92e8a3d1021 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Mon, 30 Jul 2018 22:38:23 +0000
Subject: Fix stack protector check
@@ -87,7 +87,7 @@ index 9b31d89..e19cd6c 100644
2.16.4
From 2f934356bc2d1c5accf25848e491affc3554d38b Mon Sep 17 00:00:00 2001
From 02b3dd8acfdb06aed8a46e2143cf16971c968a7f Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Wed, 1 Aug 2018 19:14:07 +0200
Subject: qt5: Fix invalid casts
@@ -120,7 +120,7 @@ index 6e22ad1..7fe7bb5 100644
2.16.4
From 8c4920ad1cec5f082a2cf63fe5c437d96643045d Mon Sep 17 00:00:00 2001
From 1fe94cf5bcb0e681a0b2d265489e98f38d6b2c10 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Thu, 2 Aug 2018 18:00:21 +0200
Subject: Remove Xorg dependency
@@ -157,7 +157,7 @@ index 738ae98..8c283f2 100644
2.16.4
From 7ecbe9143bdbb3fafefb7dae64d83d120f7f7994 Mon Sep 17 00:00:00 2001
From 2d6f58b3a7bb7a4d058e67e511dc26b40642a6e0 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Fri, 3 Aug 2018 18:34:37 +0200
Subject: Adjust distro-pack
@@ -190,3 +190,96 @@ index 426d19a..ebe103c 100644
--
2.16.4
From f6ae0e64559603e4b8e8f239cf338a046d05e30a Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Fri, 3 Aug 2018 23:45:26 +0200
Subject: Fetch xmlsec only when requested
diff --git a/Makefile.fetch b/Makefile.fetch
index 44f5031..1a7bf14 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -161,7 +161,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
$(call fetch_Optional,LIBPNG,LIBPNG_TARBALL) \
$(call fetch_Optional,LIBTOMMATH,LIBTOMMATH_TARBALL) \
$(call fetch_Optional,LIBXML2,LIBXML_TARBALL) \
- XMLSEC_TARBALL \
+ $(call fetch_Optional,XMLSEC,XMLSEC_TARBALL) \
$(call fetch_Optional,LIBXSLT,LIBXSLT_TARBALL) \
$(call fetch_Optional,LPSOLVE,LPSOLVE_TARBALL) \
$(call fetch_Optional,LXML,LXML_TARBALL) \
--
2.16.4
From dd987143576aed1aec1299043792bcdd6ac3462a Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Sun, 5 Aug 2018 22:43:12 +0200
Subject: Use correct Haiku settings path
diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx
index 49a0320..a7a4764 100644
--- a/sal/osl/unx/security.cxx
+++ b/sal/osl/unx/security.cxx
@@ -41,6 +41,11 @@
#include <crypt.h>
#endif
+#if defined HAIKU
+#include <fs_info.h>
+#include <FindDirectory.h>
+#endif
+
#include "secimpl.hxx"
#ifdef ANDROID
@@ -246,6 +251,18 @@ static bool osl_psz_getHomeDir(oslSecurity Security, sal_Char* pszDirectory, sal
if (pSecImpl == nullptr)
return false;
+#ifdef HAIKU
+ dev_t volume = dev_for_path("/boot");
+ sal_Char homeDir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
+ status_t result = find_directory(B_USER_DIRECTORY, volume, false, homeDir,
+ sizeof(homeDir));
+ if (result == B_OK && strlen(homeDir) < nMax) {
+ strcpy(pszDirectory, homeDir);
+ return true;
+ }
+ return false;
+#endif
+
#ifdef ANDROID
{
sal_Bool bRet = sal_False;
@@ -347,7 +364,23 @@ sal_Bool SAL_CALL osl_getConfigDir(oslSecurity Security, rtl_uString **pustrDire
return bRet;
}
-#if !defined(MACOSX) && !defined(IOS)
+#if defined HAIKU
+
+static bool osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax)
+{
+ (void) Security;
+ dev_t volume = dev_for_path("/boot");
+ sal_Char configDir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
+ status_t result = find_directory(B_USER_SETTINGS_DIRECTORY, volume, false,
+ configDir, sizeof(configDir));
+ if (result == B_OK && strlen(configDir) < nMax) {
+ strcpy(pszDirectory, configDir);
+ return true;
+ }
+ return false;
+}
+
+#elif !defined(MACOSX) && !defined(IOS)
#define DOT_CONFIG "/.config"
--
2.16.4