This is about cloning LibreOffice repositories. since LibreOffice source code repositories are large and far away, you can quickly clone the source code using shallow clone from a github mirror.
git clone -o github --depth=1 --recurse-submodules --shallow-submodules https://github.com/LibreOffice/core.git libreoffice
If you only want to use it for events, this is OK; if you want to continue to use this repository, unshallow it.
git fetch --unshallow
Register the TDF repository to origin
since the remote is github
.
cd libreoffice/
git remote add origin https://git.libreoffice.org/core
Add origin
to dictionary
, helpcontents
and translations
in the submodule as well.
cd dictionaries
git remote add origin https://git.libreoffice.org/dictionaries
cd ../helpcontents2/
git remote add origin https://git.libreoffice.org/help
cd ../translations/
git remote add origin https://git.libreoffice.org/translations
When you git pull
the libreoffice repository, you also need to take care of the submodule
. So also run git submodule update
.
cd libreoffice/
git pull
git submodule update
When specifying options, it is easier to create an autogen.input
file and specify them in it than to specify them in autogen.sh
.
cd libreoffice/
touch autogen.input
Edit this autogen.input
. I do the following
--disable-breakpad
--disable-odk
--disable-online-update
--enable-dbgutil
--enable-debug
--enable-epm
--enable-gen
--enable-gtk3-kde5
--enable-gtk4
--enable-kf5
--enable-optimized=debug
--enable-qt5
--enable-qt6
--enable-sal-log
--with-help
--with-lang=ja en-US
--with-locales=ja en
--with-package-format=deb
--with-privacy-policy-url=https://www.nofuture.tv/
--with-vendor=Jun Nogata
--without-doxygen
--without-myspell-dicts
When you build, you should also set up ccache
.
sudo apt install ccache
mkdir ~/.ccache/
touch ~/.ccache/ccache.conf
In ~/.ccache/ccache.conf
, the configuration is written as follows
max_size = 32G
compression = true
# cache_dir = /var/cache/ccache
Let's also add ccache to the beginning of the PATH and reload it.
echo 'export PATH="/usr/lib/ccache:$PATH"' >> ~/.bashrc
source ~/.bashrc