#!/usr/bin/make -f ################################################################################ # LibreOffice source package rules file # # Please see debian/README for detailed documentation about the build system, and # how to build LibreOffice. ################################################################################ # Authors: # Chris Halls # Rene Engelhard # Copyright 2002-2023 Software in the Public Interest, Inc. # Portions Copyright 2010 Canonical Ltd. Author: Matthias Klose # Portions Copyright 2011-2013 Canonical Ltd. Author: Bjoern Michaelsen # Licensed under the GNU General Public License, version 2. See the file # /usr/share/common-licenses/GPL or . ################################################################################ vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1))) include /usr/share/dpkg/pkg-info.mk CURDIR ?= $(realpath $(dir $(firstword $(MAKEFILE_LIST)))/..) BASE_VERSION:=$(shell echo $(DEB_VERSION) | cut -d: -f1):$(DEB_VERSION_UPSTREAM) BINARY_VERSION=$(DEB_VERSION) OOVER:=24.2 HELP_L10N_VIRTUAL_VERSION:=$(OOVER) ifeq "$(shell echo $(OOVER) | cut -d. -f2)" "2" # 24.2 + .6 -> 24.8 -> OK NEXT_OOVER=$(shell echo "$(OOVER) + .6" | bc) else # 24.8 + .6 = 25.4 -> wrong (doesn't take into account that the year # has 12 months)so subtract 2 (so effectively + .4) to get back to February (25.2), # which is supposed to be the schedule. NEXT_OOVER=$(shell echo "$(OOVER) + .4" | bc) endif ARCH_INDEP_PACKAGES := $(shell dh_listpackages -i) ARCH_DEP_PACKAGES := $(shell dh_listpackages -a) PACKAGES := $(ARCH_INDEP_PACKAGES) $(ARCH_DEP_PACKAGES) ifneq (,$(shell pwd | grep autopkgtest)) AUTOPKGTEST_BUILD=y $(warning Build for autopkgtest) endif AUTOPKGTEST_CPPUNIT_PACKAGES := $(shell dh_listpackages | grep -v help | grep -v l10n | grep -v dev-doc | grep -v "nogui$$") include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/vendor.mk SHELL:=/bin/bash SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(..\..\)\../\1/p' | cut -d" " -f1 | cut -d. -f1) SYSTEM_CLANG_VERSION = $(shell clang -v 2>&1 | head -n1 | awk '{ print $$4 }' | cut -d. -f1) PKGDIR:=debian/libreoffice OODIRNAME=libreoffice OODIR:=usr/lib/$(OODIRNAME) OOSDKDIR:=$(OODIR)/sdk # Figure out who's building this package. ifneq "$(DEB_VENDOR)" "Debian" OOO_VENDOR:=The Document Foundation, $(DEB_PARENT_VENDOR) and $(DEB_VENDOR) else OOO_VENDOR=The Document Foundation/$(DEB_VENDOR) endif export OOO_VENDOR # debhelper export DH_OPTIONS export DH_ALWAYS_EXCLUDE=CVS:.svn:.bzr:.git #export DH_VERBOSE=1 # quilt export QUILT_PATCHES=debian/patches export QUILT_OPTIONS="-p1 -F0" SOURCE_TREE=. STAMP_DIR=debian/stampdir TARFILE_LOCATION=$(CURDIR)/tarballs export TARFILE_LOCATION USE_SOURCE_TARBALLS=y USE_GIT_TARBALLS=n ifeq "$(USE_GIT_TARBALLS)" "y" GIT_BASEURL:=git://anongit.freedesktop.org/libreoffice lo_sources_ver=$(shell grep AC_INIT $(SOURCE_TREE)/configure.ac | grep documentfoundation | cut -d, -f2 | sed -e 's,\[,,' -e 's,\],,') # NOT in proper libreoffice-3-6 branch # use ./g checkout -b tag-libreoffice-3.6.2.1 libreoffice-3.6.2.1 GIT_TAG=libreoffice-$(lo_sources_ver) GIT_BRANCH=libreoffice-24-2-5 endif ifeq "$(USE_SOURCE_TARBALLS)" "y" lo_sources_ver=$(shell cat $(CURDIR)/sources.ver | cut -d= -f2) endif ######### # Default package configuration # # FIXME: Should riscv64 be here at all given it doesn't support NaN payload propagation which LO (at least Calc) needs? # see https://bugs.documentfoundation.org/show_bug.cgi?id=152943 and https://lists.debian.org/debian-riscv/2024/01/msg00018.html OOO_ARCHS = alpha amd64 arm64 armel armhf hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 loong64 m68k mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el riscv64 s390x sparc sparc64 DEBIAN_MAIN_ARCHITECTURES = amd64 arm64 armel armhf i386 mipsel mips64el ppc64el riscv64 s390x PATCHSET=$(DEB_VENDOR) BUILD_DEPS=\ autoconf,\ automake,\ bc,\ bison,\ bzip2,\ flex, \ gperf,\ libfreetype-dev,\ libfontconfig-dev,\ pkgconf,\ unzip,\ xsltproc,\ zip,\ zlib1g-dev\ BUILD_DEPS_INDEP += rdfind, symlinks # These are components which can be built from internal copies, or used from the # distribution. See configure --help for valid values (--with-system-). SYSTEM_STUFF = dicts ENABLE_GUI=y ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),) ENABLE_PYTHON=y ifeq "$(ENABLE_PYTHON)" "y" CONFIGURE_FLAGS += --enable-python=system ENABLE_SCRIPT_PROVIDER_PYTHON=y PACKAGE_LIBRELOGO=y endif # THIS IS ONLY FOR TESTING. When building against a specified pythonX.Y # this will work inside OOo but *not* from outside OOo unless the user # uses pythonX.Y directly (and the dh_pycentral-created dependencies allow # also the non-working default python then) - see e.g. #587402. Also # note we are NOT working with python < 2.6 anymore! PYTHON_VERSION=current ifeq "$(PYTHON_VERSION)" "current" PYTHON=python3 export PYTHON else # somehow configure insists on using python3 "for pyuno". The only way to # override this (afaics) is this... PYTHON=python$(PYTHON_VERSION) PYTHON_CFLAGS=$(shell pkg-config --cflags python-$(PYTHON_VERSION)) PYTHON_LIBS=$(shell pkg-config --libs python-$(PYTHON_VERSION)) export PYTHON PYTHON_VERSION PYTHON_CFLAGS PYTHON_LIBS endif endif BUILD_ONLY_EN_US=n ifeq ($(filter nojava,$(DEB_BUILD_PROFILES)),) include /usr/share/java/java_defaults.mk ifneq "$(BOOKWORM_BACKPORT)" "y" ifneq ($(DEB_HOST_ARCH),$(filter-out $(DEB_HOST_ARCH),$(java_unsupported_architectures))) ENABLE_JAVA=y endif else ENABLE_JAVA=y endif ifeq "$(ENABLE_JAVA)" "y" JDK=default ifneq "$(JDK)" "default" JAVA_MAINVER=17 endif endif else ENABLE_JAVA=n endif #JAVAHELPER_MIN_VERSION= SYSTEM_STUFF += hunspell SYSTEM_STUFF += altlinuxhyph SYSTEM_STUFF += boost BOOST_VERSION=default # libmdds-dev depends on libboost-dev, which will be removed # when you install a non-default libboostX.Y-dev ifeq "$(BOOST_VERSION)" "default" SYSTEM_STUFF += mdds endif USE_EXTERNAL_CXXLIBS=y SYSTEM_STUFF += mythes SYSTEM_STUFF += icu SYSTEM_STUFF += librevenge SYSTEM_STUFF += libwpd libwpg libwps SYSTEM_STUFF += libvisio SYSTEM_STUFF += libcdr SYSTEM_STUFF += libmspub SYSTEM_STUFF += libmwaw SYSTEM_STUFF += libodfgen SYSTEM_STUFF += libepubgen SYSTEM_STUFF += libetonyek SYSTEM_STUFF += libfreehand # this is libe-book, NOT evolutions libebook (which is # dlopen()'ed anyway and whose headers we need from the # system anyways if enabled SYSTEM_STUFF += libebook SYSTEM_STUFF += libabw SYSTEM_STUFF += libpagemaker SYSTEM_STUFF += libzmf SYSTEM_STUFF += libstaroffice SYSTEM_STUFF += libqxp ENABLE_ZXING=y SYSTEM_STUFF += zxing BUILD_CAIROCANVAS=y SYSTEM_STUFF += cairo ENABLE_GPGMEPP=y ifeq "$(ENABLE_GUI)" "y" BUILD_PLASMA=y # let's assume we won't ship two plasmas parallel.. PLASMA_VERSION=5 PLASMA_KF_VERSION=$(PLASMA_VERSION) ENABLE_QT5=n #QT5_MINVER= ENABLE_KF5=y ENABLE_QT6=y ENABLE_KF6=n endif # go sure. if we want plasma, we want kfX, too and if we want that # one we want qtX, too. ifeq "$(BUILD_PLASMA)" "y" ifeq "$(PLASMA_VERSION)" "5" ENABLE_KF5=y endif ifeq "$(PLASMA_VERSION)" "6" ENABLE_KF6=y endif endif # KF5 depends on Qt5 ifeq "$(ENABLE_KF5)" "y" ENABLE_QT5=y KF5_QT5_DEPENDS := libreoffice-qt5 (= $${binary:Version}) endif # KF6 depends on Qt6 ifeq "$(ENABLE_KF6)" "y" ENABLE_QT6=y KF6_QT6_DEPENDS := libreoffice-qt6 (= $${binary:Version}) endif # https://www.debian.org/doc/debian-policy/ says this is not defined and must # be ignored, but dh_strip mentions (and honours) it, so... ifneq (noautodbgsym,$(findstring noautodbgsym,$(DEB_BUILD_OPTIONS))) BUILD_DBGSYM_PACKAGES=y ifeq "$(DEB_HOST_ARCH)" "amd64" USE_DWZ=y DWZ_ARGS:=-L 100000000 endif endif SYSTEM_STUFF += xmlsec SYSTEM_STUFF += zxcvbn ifeq ($(filter noinsttest,$(DEB_BUILD_PROFILES)),) # this changes the packages built/contents of packages (-subsequentcheckbase) # This is not exactly allowed in https://wiki.debian.org/BuildProfileSpec#Registered_profile_names # but it doesn't have real practical difference, does it? ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) BUILD_TEST_PACKAGES=y endif endif ifneq ($(MAKECMDGOALS),binary-indep) ENABLE_SYMBOLS=y SMALL_SYMBOLS=y endif ifeq ($(MAKECMDGOALS),binary-indep) # no need to do a double build... BUILD_NOGUI_PACKAGES=n # go sure ifeq "$(BUILD_TEST_PACKAGES)" "y" ENABLE_JUNIT4=y endif endif ifeq "$(ENABLE_JAVA)" "y" SYSTEM_STUFF += beanshell SYSTEM_STUFF += hsqldb endif ENABLE_LPSOLVE=y SYSTEM_STUFF += lpsolve USE_SHARED_LPSOLVE=y #LPSOLVE_MIN_VERSION= ENABLE_COINMP=y SYSTEM_STUFF += coinmp USE_DBUS=y ifeq "$(USE_DBUS)" "y" ifeq (,$(findstring linux,$(DEB_HOST_ARCH_OS))) ENABLE_BLUETOOTH=n else ENABLE_BLUETOOTH=y SYSTEM_STUFF += bluez endif ENABLE_PACKAGEKIT=n endif ENABLE_AVAHI=y ifeq "$(ENABLE_GUI)" "y" USE_GSTREAMER=y endif ENABLE_CURL=y ENABLE_WEBDAV=y ifeq "$(ENABLE_WEBDAV)" "y" ENABLE_CURL=y endif ifeq "$(ENABLE_CURL)" "y" SYSTEM_STUFF += curl endif SYSTEM_STUFF += redland PACKAGE_SDK=y ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) PACKAGE_SDK_DOCS=n else PACKAGE_SDK_DOCS=y endif PACKAGE_LOKIT=y # will not work, uses schema/ stripped in the tarballs ifeq "$(USE_SOURCE_TARBALLS)" "y" ENABLE_EXPORT_VALIDATION_TESTS=n endif #JUNIT_MIN_VER= PARALLEL_BUILD=y ENABLE_LDAP=y SYSTEM_STUFF += openldap SYSTEM_STUFF += epoxy ifeq "$(ENABLE_JAVA)" "y" ENABLE_REPORTBUILDER=y SYSTEM_STUFF += jfreereport ENABLE_MEDIAWIKI=y ENABLE_SCRIPT_PROVIDER_BSH=y ENABLE_SCRIPT_PROVIDER_JS=y ENABLE_NLPSOLVER=y else ENABLE_REPORTBUILDER=n ENABLE_MEDIAWIKI=n ENABLE_SCRIPT_PROVIDER_BSH=n ENABLE_SCRIPT_PROVIDER_JS=n ENABLE_NLPSOLVER=n endif ENABLE_SDBC_POSTGRESQL=y ifeq "$(ENABLE_GUI)" "y" BUILD_GTK3=y # introspection needs GTK3 ifeq "$(BUILD_GTK3)" "y" ifeq ($(filter nogir,$(DEB_BUILD_PROFILES)),) ENABLE_INTROSPECTION=y endif endif endif BUILD_GTK4=y ENABLE_EVO2=y ENABLE_GIO=y ENABLE_DCONF=y ENABLE_RANDR=y PACKAGE_BASE=y SYSTEM_STUFF += graphite SYSTEM_STUFF += harfbuzz SYSTEM_STUFF += libexttextcat SYSTEM_STUFF += cppunit SYSTEM_STUFF += dragonbox SYSTEM_STUFF += libfixmath DEFAULT_IMAGE=colibre IMAGES:=$(DEFAULT_IMAGE) colibre_dark colibre_svg colibre_dark_svg sifr sifr_svg sifr_dark sifr_dark_svg breeze breeze_dark breeze_dark_svg breeze_svg elementary elementary_svg karasa_jaga karasa_jaga_svg sukapura sukapura_svg sukapura_dark sukapura_dark_svg CONFIGURE_FLAGS_INDEP += --with-theme="$(IMAGES)" ENABLE_MARIADB=y ifeq "$(ENABLE_MARIADB)" "y" # FIXME: the mysql test doesn't get really tested since it is only ran/built # with CONNECTIVITY_TEST_MYSQL_DRIVER set - and doesn't build on 32bit... The # test is run in autopkgtest on OOO_CHECK_FATAL_ARCHS (aka 64bit archs!) only for # now anyway so let's just hack around here for now and disable the build of it # alltogether when not used and just set CONNECTIVITY_TEST_MYSQL_DRIVER on those # OOO_CHECK_FATAL_ARCHS ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_FATAL_ARCHS))) export CONNECTIVITY_TEST_MYSQL_DRIVER=dummy endif endif MYSQL_FLAVOUR=mariadb # set this also to y for system-mysql.. SYSTEM_STUFF += mariadb SYSTEM_STUFF += postgresql DICT_DIR=/usr/share/hunspell HYPH_DIR=/usr/share/hyphen THES_DIR=/usr/share/mythes ENABLE_LIBCMIS=y ifeq "$(ENABLE_LIBCMIS)" "y" SYSTEM_STUFF += libcmis endif SYSTEM_STUFF += jpeg SYSTEM_STUFF += libxml SYSTEM_STUFF += expat SYSTEM_STUFF += odbc SYSTEM_STUFF += sane ENABLE_PDFIMPORT=y ENABLE_POPPLER=y SYSTEM_STUFF += poppler ENABLE_PDFIUM=y PACKAGE_GEN=y ifeq "$(PACKAGE_GEN)" "y" # keep packaging gen (s390x is a release arch...), just disable skia. In contrast for # alpha and ia64 (ports-only) where skia also is disabled we set PACKAGE_GEN=n later in # the architecture specific settings ifneq (big,$(DEB_HOST_ARCH_ENDIAN)) ENABLE_SKIA=y endif else ENABLE_SKIA=n endif SYSTEM_STUFF += libpng ENABLE_NSS=y ifeq "$(ENABLE_NSS)" "y" SYSTEM_STUFF += nss endif ENABLE_HELP=y ifeq "$(ENABLE_HELP)" "y" ENABLE_HTML_HELP=y ENABLE_XMLHELP=y ifeq "$(ENABLE_HTML_HELP)" "y" HELP_DEPENDS := libreoffice-help-common (= $${binary:Version}), HELP_RECOMMENDS := firefox-esr | epiphany-browser | konqueror | chromium | firefox HELP_COMMON_DEPENDS := node-normalize.css BUILD_DEPS_INDEP += , node-normalize.css HELP_COMMON_DEPENDS += , node-prismjs BUILD_DEPS_INDEP += , node-prismjs else HELP_DEPENDS := libreoffice-writer DEBHELPER_OPTIONS += -Nlibreoffice-help-common endif ifeq "$(ENABLE_XMLHELP)" "y" SYSTEM_STUFF += clucene endif endif SYSTEM_STUFF += lcms2 SYSTEM_STUFF += liblangtag SYSTEM_STUFF += orcus # kfreebsd runs into SIZE_MAX problems, and the rest might # get OOM (mips(el)...) so enable mergelibs only for 64bit # archs ifeq (,$(filter kfreebsd,$(DEB_HOST_ARCH))) ifeq "$(DEB_HOST_ARCH_BITS)" "64" ENABLE_MERGELIBS=y endif endif ifeq "$(ENABLE_MERGELIBS)" "y" ENABLE_LTO=y else ENABLE_LTO=n endif USE_OPENCL=y ENABLE_FIREBIRD=y ifeq "$(ENABLE_FIREBIRD)" "y" SYSTEM_STUFF += firebird ifeq (,$(filter firebird, $(SYSTEM_STUFF))) SYSTEM_STUFF += libatomic-ops SYSTEM_STUFF += libtommath endif endif ENABLE_EOT=y ifeq "$(ENABLE_EOT)" "y" SYSTEM_STUFF += libeot endif SYSTEM_STUFF += glm BUILD_PPC64EL=y BUILD_ARM64=y SYSTEM_STUFF += gpgmepp INSTALL_APPARMOR_PROFILES=y ENABLE_APPARMOR_PROFILES=y ifneq "$(AUTOPKGTEST_BUILD)" "y" CHECK_APPARMOR_PROFILES=true endif SYSTEM_STUFF += libnumbertext SYSTEM_STUFF += box2d SYSTEM_STUFF += libwebp SYSTEM_STUFF += libtiff SYSTEM_STUFF += frozen SYSTEM_STUFF += argon2 # override stuff for indep builds to save build dependencies ifeq ($(MAKECMDGOALS),binary-indep) ENABLE_EVOAB=n BUILD_GTK3=n ENABLE_INTROSPECTION=n ENABLE_GIO=n BUILD_GTK4=n ENABLE_QT5=n ENABLE_QT6=n # libgpgmepp-dev depends on Qt, too, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863149 ENABLE_GPGMEPP=n ENABLE_KF5=n ENABLE_KF6=n BUILD_PLASMA=n ENABLE_MARIADB=n ENABLE_FIREBIRD=n ENABLE_SDBC_POSTGRESQL=n ENABLE_SKIA=n ENABLE_COINMP=n ENABLE_LPSOLVE=n USE_GSTREAMER=n ENABLE_LDAP=n ENABLE_PDFIUM=n USE_DBUS=n ENABLE_AVAHI=n endif # Default flags to pass to configure CONFIGURE_FLAGS+= \ --with-vendor='$(OOO_VENDOR)' \ --with-extra-buildid='$(DEB_VENDOR) package version: $(BINARY_VERSION)' \ --prefix=/usr --mandir=/usr/share/man \ --docdir=/usr/share/doc/libreoffice \ --libdir=/usr/lib \ --bindir=/usr/bin \ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --disable-online-update \ --disable-fetch-external \ --without-fonts \ --without-myspell-dicts \ --with-branding=$(CURDIR)/debian/branding \ --without-coredumpctl # don't rebuild the font anywhere, we just really need it in indep builds. # please put https://dev-www.libreoffice.org/extern/f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf # into $(SOURCE_TREE)/tarballs if you don't rebuild the font. BUILD_DEPS_INDEP += , fontforge-nox | fontforge ifeq ($(filter pkg.libreoffice.noopensymbolbuild,$(DEB_BUILD_PROFILES)),) ENABLE_OPENSYMBOL_BUILD=y endif # we get a fonts-opensymbol build-dep -b builds (_ARCH also affects -b), too anyway but it's still lesser # dependencies than fontforge-nox | fontforge... # But this can get a problem for bootstrapping if we ever needed a newer fonts-opensymbol for # tests to pass... # Allow building it nevertheless if wanted BUILD_DEPS_ARCH += , fonts-opensymbol ifneq ($(MAKECMDGOALS),build-arch) ifneq ($(filter pkg.libreoffice.opensymbolbuild,$(DEB_BUILD_PROFILES)),) ENABLE_OPENSYMBOL_BUILD=y endif ifeq "$(ENABLE_OPENSYMBOL_BUILD)" "y" CONFIGURE_FLAGS_INDEP += --enable-build-opensymbol endif endif ifeq "$(ENABLE_GUI)" "y" BUILD_DEPS += ,\ libcups2-dev,\ libgl-dev,\ libice-dev,\ libsm-dev,\ libx11-dev,\ libx11-xcb-dev, \ libxaw7-dev,\ libxext-dev,\ libxinerama-dev,\ libxkbfile-dev,\ libxrender-dev,\ libxt-dev,\ libxtst-dev,\ x11proto-render-dev endif ifeq "$(ENABLE_HELP)" "y" CONFIGURE_FLAGS_INDEP+= --with-help ifeq "$(ENABLE_HTML_HELP)" "y" CONFIGURE_FLAGS_INDEP+= --with-help=html endif ifneq "$(ENABLE_XMLHELP)" "y" CONFIGURE_FLAGS += --disable-xmlhelp endif else CONFIGURE_FLAGS += --without-helppack-integration --without-help endif ifeq "$(shell echo $(DEB_VERSION_UPSTREAM) | grep -E '(alpha|beta)'; echo $$?)" "1" CONFIGURE_FLAGS += --enable-release-build RELEASE_BUILD := y endif ifeq "$(DEB_DISTRIBUTION)" "UNRELEASED" BUGS=mailto:debian-openoffice@lists.debian.org endif ifneq (terse,$(findstring terse,$(DEB_BUILD_OPTIONS))) export verbose=t endif ############# # Architecture-specific changes # helper to generate no_archs macros (pass name of source macro) define gen_no_archs _no_arch_macro = $(subst OOO_,OOO_NO_,$1) _no_arch_tmp_$1 = $$(foreach _a,$$(filter-out $$(call $1),$(OOO_ARCHS)),!$$(_a)) $$(_no_arch_macro) = $$(if $$(_no_arch_tmp_$1),$$(_empty) [$$(_no_arch_tmp_$1)]) endef PLATFORMID := $(shell grep PLATFORMID debian/vars.$(DEB_HOST_ARCH) | cut -d"=" -f2) RTL_OS := $(shell grep RTL_OS debian/vars.$(DEB_HOST_ARCH) | cut -d"=" -f2) RTL_ARCH := $(shell grep RTL_ARCH debian/vars.$(DEB_HOST_ARCH) | cut -d"=" -f2) OOO_64BIT_ARCHS = $(filter alpha amd64 arm64 ia64 kfreebsd-amd64 loong64 mips64 mips64el ppc64 ppc64el riscv64 s390x sparc64, $(OOO_ARCHS)) $(eval $(call gen_no_archs,OOO_64BIT_ARCHS)) OOO_32BIT_ARCHS = $(filter-out $(OOO_64BIT_ARCHS),$(OOO_ARCHS)) $(eval $(call gen_no_archs,OOO_32BIT_ARCHS)) OOO_BE_ARCHS = $(filter hppa m68k mips mips64 powerpc powerpcspe ppc64 s390 s390x sparc sparc64,$(OOO_ARCHS)) $(eval $(call gen_no_archs,OOO_BE_ARCHS)) OOO_LE_ARCHS = $(filter-out $(OOO_BE_ARCHS),$(OOO_ARCHS)) $(eval $(call gen_no_archs,OOO_LE_ARCHS)) # s390x: bigendian, so no skia at all # ppc64el: see https://git.launchpad.net/~libreoffice/ubuntu/+source/libreoffice/patch/?id=be47aa72aad414537d27f0a18af7d067f1398666 and # https://github.com/llvm/llvm-project/issues/63214 OOO_CLANG_ARCHS := $(filter-out alpha ia64 ppc64el mipsel mips64el,$(OOO_LE_ARCHS)) $(eval $(call gen_no_archs,OOO_CLANG_ARCHS)) # supported upstream (upstream does aarch64 flatpak builds) OOO_CHECK_ARCHS := amd64 arm64 $(eval $(call gen_no_archs,OOO_CHECK_ARCHS)) OOO_JUNIT_ARCHS := amd64 arm64 $(eval $(call gen_no_archs,OOO_JUNIT_ARCHS)) OOO_CHECK_FATAL_ARCHS := amd64 arm64 # original idea was without armhf, but since --disable-cve-tests for 32bit archs (see below) # this now also passes. and the autopkgtests also pass (also the junit ones). # So let's include armhf in the above OOO_CHECK_ARCHS += armhf #OOO_JUNIT_ARCHS += armhf OOO_CHECK_FATAL_ARCHS += armhf # if bridgetest and smoketest fail this is surely not working in a way # we would want in the archive OOO_SMOKETEST_FATAL_ARCHS := $(OOO_ARCHS) # archs where the archive/ci runs autopkgtests OOO_AUTOPKGTEST_ARCHS := $(OOO_CHECK_ARCHS) armel i386 ppc64el s390x riscv64 ifeq (alpha,$(findstring $(DEB_HOST_ARCH),$(OOO_ARCHS))) PACKAGE_GEN=n endif ifeq (ia64,$(findstring $(DEB_HOST_ARCH),$(OOO_ARCHS))) PACKAGE_GEN=n endif BUILD_TESTS=y ifeq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) BUILD_TESTS=n endif ifeq "$(DEB_HOST_ARCH_BITS)" "32" # consistently crash in vcl_filters_test when # Testing load file:///<>//vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-9936-1.tiff: # CVE-2017-9936 is a memory leak and even a expected failure. # And we are not supposed to test for others' packages CVEs anyway, especially since this is fixed in libtiff # in 4.0.8-3(see https://security-tracker.debian.org/tracker/CVE-2017-9936) so ages ago CONFIGURE_FLAGS += --disable-cve-tests endif RUN_MAKE_CHECK=n ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_ARCHS))) RUN_MAKE_CHECK=y endif ifeq "$(RUN_MAKE_CHECK)" "y" ifeq "$(ENABLE_JAVA)" "y" ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_JUNIT_ARCHS))) ENABLE_JUNIT4=y endif endif # run the atspi tests ifeq "$(BUILD_GTK3)" "y" ENABLE_ATSPI_TESTS=y endif endif IGNORE_MAKE_FAILURES=- TEST_TIMEOUT := timeout --foreground --preserve-status -v -k 250m 200m ifeq "$(RUN_MAKE_CHECK)" "y" ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_FATAL_ARCHS))) IGNORE_MAKE_FAILURES:= TEST_TIMEOUT:= endif else ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_SMOKETEST_FATAL_ARCHS))) IGNORE_MAKE_FAILURES:= TEST_TIMEOUT:= endif endif endif ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_TESTS=y else BUILD_TESTS=n endif # Java... # upstream says --source=1.8 / --target=1.8 so 1.8 is fine in runtime JAVA_RUNTIME_BASELINE=8 JAVA_BRIDGE_BROKEN_ARCHS:=ppc64el s390x armhf ifeq "$(JDK)" "default" OOO_JAVA_ARCHS = $(filter-out $(JAVA_BRIDGE_BROKEN_ARCHS),$(filter $(OOO_ARCHS),$(java$(JAVA_RUNTIME_BASELINE)_architectures))) else OOO_JAVA_ARCHS = $(OOO_ARCHS) endif $(eval $(call gen_no_archs,OOO_JAVA_ARCHS)) OOO_ARCH_DEP_EXTENSIONS_ARCHS := $(OOO_ARCHS) OOO_EXTENSIONS_ARCHS := $(OOO_ARCH_DEP_EXTENSIONS_ARCHS) OOO_BASE_ARCHS := $(OOO_ARCHS) $(eval $(call gen_no_archs,OOO_BASE_ARCHS)) OOO_REPORTBUILDER_ARCHS := $(OOO_JAVA_ARCHS) $(eval $(call gen_no_archs,OOO_REPORTBUILDER_ARCHS)) OOO_FIREBIRD_ARCHS := $(filter-out m68k,$(OOO_BASE_ARCHS)) $(eval $(call gen_no_archs,OOO_FIREBIRD_ARCHS)) OOO_NOGUI_ARCHS := $(filter amd64 i386 arm64 armhf s390x ppc64 ppc64el,$(OOO_ARCHS)) $(eval $(call gen_no_archs,OOO_NOGUI_ARCHS)) OOO_PDFIUM_ARCHS := $(OOO_ARCHS) $(eval $(call gen_no_archs,OOO_PDFIUM_ARCHS)) ifneq (,$(filter $(DEB_HOST_ARCH),$(OOO_NO_BASE_ARCHS))) ifneq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_BASE_ARCHS))) PACKAGE_BASE=n ENABLE_SDBC_POSTGRESQL=n ENABLE_EVO2=n ENABLE_REPORTBUILDER=n DEBHELPER_OPTIONS += -Nlibreoffice-base libreoffice-base-core -Nlibreoffice-base-drivers DEBHELPER_OPTIONS += -Nlibreoffice-evolution DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-postgresql -Nlibreoffice-sdbc-mysql DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-hsqldb -Nlibreoffice-sdbc-firebird DEBHELPER_OPTIONS += -Nlibreoffice-report-builder-bin -Nlibreoffice-report-builder DEBHELPER_OPTIONS += -Npython3-access2base # CONFIGURE_FLAGS += --disable-database-connectivity endif endif ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_EXTENSIONS_ARCHS))) ENABLE_MEDIAWIKI=n ENABLE_NLPSOLVER=n DEBHELPER_OPTIONS += -Nlibreoffice-wiki-publisher -Nlibreoffice-nlpsolver CONFIGURE_FLAGS += --disable-extension-integration --disable-extensions endif ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_JAVA_ARCHS))) ENABLE_JAVA=n ENABLE_REPORTBUILDER=n ENABLE_MEDIAWIKI=n ENABLE_NLPSOLVER=n endif ifneq "$(BUILD_TEST_PACKAGES)" "y" DEBHELPER_OPTIONS += -Nlibreoffice-subsequentcheckbase -Nlibreoffice-smoketest-data else BUILD_DEPS_INDEP += , junit4 $(JUNIT_MIN_VER) endif ifeq "$(ENABLE_GUI)" "y" ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_NOGUI_ARCHS))) BUILD_NOGUI_PACKAGES=y endif else CONFIGURE_FLAGS += --disable-gui DEBHELPER_OPTIONS += -Nlibreoffice-core -Nlibreoffice-calc -Nlibreoffice-writer -Nlibreoffice-draw -Nlibreoffice-report-builder-bin -Nlibreoffice-base -Nlibreoffice-impress -Nlibreoffice-math endif ifneq "$(BUILD_NOGUI_PACKAGES)" "y" DEBHELPER_OPTIONS += -Nlibreoffice-core-nogui -Nlibreoffice-calc-nogui -Nlibreoffice-writer-nogui -Nlibreoffice-draw-nogui -Nlibreoffice-report-builder-bin-nogui -Nlibreoffice-base-nogui -Nlibreoffice-impress-nogui -Nlibreoffice-math-nogui endif ifeq "$(AUTOPKGTEST_BUILD)" "y" # as above (for binary-indep), no need to do two builds here... # needs to be here since there is arch-specific rules before BUILD_NOGUI_PACKAGES=n # go sure BUILD_TESTS=y BUILD_TEST_PACKAGES=y ENABLE_JUNIT4=y endif ############# # Distro-specific overrides # Debian Bookworm ifeq "$(DEB_DISTRIBUTION)" "bookworm-backports" BUGS=mailto:debian-backports@lists.debian.org SYSTEM_STUFF := $(filter-out frozen mdds orcus libcmis,$(SYSTEM_STUFF)) BOOKWORM_BACKPORT=y ENABLE_KF6=n endif ifeq "$(BOOKWORM_BACKPORT)" "y" ifneq (,$(shell grep t64 debian/control)) $(error Revert t64 rename 6f794ba67d113395d7662c2ebf5f67b37eddff09 for bookworm-backports!) endif else BUILD_DEPS += , dpkg-dev (>= 1.22.5) [$(filter-out i386,$(OOO_32BIT_ARCHS))] endif CONFIGURE_FLAGS += $(foreach i, $(SYSTEM_STUFF),--with-system-$(i)) CC_PREFIX:=$(shell gcc -dumpmachine)- # generally use clang USE_CLANG=n # allow clang for skia? ALLOW_CLANG=y CLANG_VERSION=default ifneq "$(shell echo $(USE_CLANG)$(ALLOW_CLANG) | grep y)" "" # /usr/bin/ld: /usr/lib/llvm-11/bin/../lib/LLVMgold.so: error loading plugin: /usr/lib/llvm-11/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory # for mips64el and riscv64 that doesn't exist so disable LTO there... ifeq "$(ENABLE_LTO)" "y" ifeq "$(DEB_HOST_ARCH)" "mips64el" ENABLE_LTO=n endif # we apparently also need --disable-split-debug (see below) since according to configure.ac both are # "Inherently incompatible, since no debug info is created while compiling, GCC complains." # so make it explicit ifeq "$(DEB_HOST_ARCH)" "riscv64" ENABLE_LTO=n endif # probably... ifeq "$(DEB_HOST_ARCH)" "loong64" ENABLE_LTO=n endif # since the llvm-defaults packages pointing to llvm 13(?) it apparently doesn't # automatically pull in llvm-xx-linker-tools anymore which contains the needed LLVMgold.so # (see above). # So build-depend on llvm, too. # We shouldn't depend on llvm-xx-linker-tools since this probably should be # version-agnostic when the default changes (unless explicitely specified of course). ifeq "$(USE_CLANG)" "y" ifeq "$(CLANG_VERSION)" "default" BUILD_DEPS += , llvm else BUILD_DEPS += , llvm-$(CLANG_VERSION)-linker-tools endif else ifeq "$(ALLOW_CLANG)" "y" ifeq "$(CLANG_VERSION)" "default" BUILD_DEPS_ARCH += , llvm$(OOO_NO_CLANG_ARCHS) else BUILD_DEPS_ARCH += , llvm-$(CLANG_VERSION)-linker-tools$(OOO_NO_CLANG_ARCHS) endif endif endif endif endif ifeq "$(USE_DWZ)" "y" # dwz errors out with # dwz: debian/libreoffice-core/usr/lib/libreoffice/program/libskialo.so: Unknown debugging section .debug_addr # since clang 14 ifeq "$(USE_CLANG)" "y" USE_DWZ := n endif ifeq "$(ENABLE_SKIA)" "y" ifneq "$(shell echo $(ALLOW_CLANG) | grep y)" "" ifeq "$(shell dpkg --compare-versions $(SYSTEM_CLANG_VERSION) ge 14 && echo true)" "true" DH_DWZ_ARGS += -Xskia endif endif endif endif ifeq "$(USE_CLANG)" "y" ENABLE_COMPILER_PLUGINS=n endif ifneq "$(USE_CLANG)" "y" ifneq "$(GCC_VERSION)" "" ifneq "$(SYSTEM_GCC_VERSION)" "$(GCC_VERSION)" BUILD_DEPS += , gcc-$(GCC_VERSION), g++-$(GCC_VERSION) CONFIGURE_FLAGS+= \ CC=$(CC_PREFIX)gcc-$(GCC_VERSION) \ CXX=$(CC_PREFIX)g++-$(GCC_VERSION) endif else BUILD_DEPS += , gcc (>= 4:12), g++ (>= 4:12) endif # Use -O0 for gcc 10 on armhf to avoid build/test failure with gcc 10 # https://bugs.launchpad.net/ubuntu/+bug/1891623 # In Debian this never appeared to be an actual build failure but # this also helps for the test timeout on armv8 machines/buildds. # (armv7 "works"). So make it conditional on whether we run checks. # With g++-10 there also appear SIGSEGVs in/with openjdk-11 and it # hangs at RunMacros, which also tries to use Java "Macros". # A --without-java build passes. ifeq "$(DEB_HOST_ARCH)" "armhf" ifeq ($(ENABLE_JAVA),y) ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) ifneq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) DEB_BUILD_OPTIONS += noopt endif endif endif endif # and also on s390x since it otherwise gets miscompiled. # Upstream tracked it down to a gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106355 # but # 16:37 <@sberg> _rene_, I couldn't reproduce the issue with an -O0 (--enable-dbgutil) build, and can with a -O2 (no --enable-debug etc.) one ifeq "$(DEB_HOST_ARCH)" "s390x" ifneq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) DEB_BUILD_OPTIONS += noopt endif endif # bridgetest fails when built with gcc 13, works with 12 ifneq "$(BOOKWORM_BACKPORT)" "y" BUILD_DEPS += , gcc-12 [i386], g++-12 [i386] endif ifeq "$(DEB_HOST_ARCH)" "i386" ifneq "$(BOOKWORM_BACKPORT)" "y" CONFIGURE_FLAGS+= \ CC=$(CC_PREFIX)gcc-12 \ CXX=$(CC_PREFIX)g++-12 endif endif ifeq "$(DEB_HOST_ARCH)" "riscv64" # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039906#26 (fixed) # and it seems it the payloadNaN test actually passes with -O2 where it's # unclear whether it actually is on hardware supporting it. Let's keep at # -O0 for now and be sure it fails before shipping something broken ifneq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) DEB_BUILD_OPTIONS += noopt endif # see https://lists.debian.org/debian-riscv/2024/01/msg00018.html CONFIGURE_FLAGS += --disable-split-debug endif # skia build picks up clang if present (for performance reasons, # at least on Windows...). See the thread starting at # https://lists.freedesktop.org/archives/libreoffice/2020-April/084929.html # Make it a explicit build-dependency so we don't have builds # "randomly" using gcc or clang depending on whether clang is installed # or not ifeq "$(ENABLE_SKIA)" "y" ifeq "$(ALLOW_CLANG)" "y" ifeq (ccache,$(findstring ccache,$(DEB_BUILD_OPTIONS))) export CCACHE_CPP2=1 endif ifeq "$(CLANG_VERSION)" "default" export LO_CLANG_CC=clang export LO_CLANG_CXX=clang++ BUILD_DEPS_ARCH += , clang$(OOO_NO_CLANG_ARCHS) else export LO_CLANG_CC=clang-$(CLANG_VERSION) export LO_CLANG_CXX=clang++-$(CLANG_VERSION) BUILD_DEPS_ARCH += , clang-$(CLANG_VERSION) [$(OOO_LE_ARCHS)] endif endif endif else ifeq "$(CLANG_VERSION)" "default" BUILD_DEPS += , clang CONFIGURE_FLAGS+= CC=clang CXX=clang++ else BUILD_DEPS += , clang-$(CLANG_VERSION) CONFIGURE_FLAGS+= CC=clang-$(CLANG_VERSION) CXX=clang++-$(CLANG_VERSION) endif ifeq "$(ENABLE_COMPILER_PLUGINS)" "y" CONFIGURE_FLAGS += --enable-compiler-plugins CLANGDIR := /usr/lib/llvm-$(shell $(CLANG) --version | head -n 1 | awk '{ print $$3 }' | cut -d. -f1) ifeq "$(CLANG_VERSION)" "default" BUILD_DEPS += , clang (>= 1:12.0.1), libclang-dev (>= 1:12.0.1), llvm-dev (>= 1:12.0.1) else BUILD_DEPS += , libclang-$(CLANG_VERSION)-dev, llvm-$(CLANG_VERSION)-dev endif endif endif USE_GOLD=n ALLOW_GOLD=n # leaves cruft around after building because it runs update_pch.sh.. ENABLE_PCH=n ifeq "$(PACKAGE_SDK)" "y" CONFIGURE_FLAGS += --enable-odk ifeq "$(PACKAGE_SDK_DOCS)" "y" BUILD_DEPS_INDEP += , doxygen , graphviz else CONFIGURE_FLAGS += --without-doxygen --without-javadoc endif endif ifeq "$(ENABLE_PDFIMPORT)" "y" ifeq "$(ENABLE_POPPLER)" "y" BUILD_DEPS += , libpoppler-dev, libpoppler-private-dev, libpoppler-cpp-dev ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS_ARCH += , poppler-data$(OOO_NO_CHECK_ARCHS) endif else CONFIGURE_FLAGS += --disable-poppler endif ifeq "$(ENABLE_PDFIUM)" "n" CONFIGURE_FLAGS += --disable-pdfium else SYSTEM_STUFF += abseil SYSTEM_STUFF += openjpeg ifneq (,$(filter openjpeg, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libopenjp2-7-dev [$(OOO_PDFIUM_ARCHS)] endif ifneq (,$(filter abseil, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libabsl-dev [$(OOO_PDFIUM_ARCHS)] endif endif endif ifneq (,$(filter graphite, $(SYSTEM_STUFF))) BUILD_DEPS += , libgraphite2-dev endif ifneq (,$(filter harfbuzz, $(SYSTEM_STUFF))) BUILD_DEPS += , libharfbuzz-dev (>= 5.1.0) endif ifneq (,$(filter libexttextcat, $(SYSTEM_STUFF))) BUILD_DEPS += , libexttextcat-dev TEXTCAT_DATA_RECOMMENDS := libexttextcat-data endif ifneq "$(ENABLE_LDAP)" "y" CONFIGURE_FLAGS += --disable-ldap endif ifneq (,$(filter libnumbertext, $(SYSTEM_STUFF))) BUILD_DEPS += , libnumbertext-dev ifeq "$(RUN_MAKE_CHECK)" "y" # https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-7-3&id=09dfe214a30f58ddcd7a857db8f5eee68d4cef2a BUILD_DEPS_ARCH += , libnumbertext-data (>= 1.0.11) endif NUMBERTEXT_DATA_RECOMMENDS := libnumbertext-data endif ifneq (,$(filter jpeg, $(SYSTEM_STUFF))) BUILD_DEPS += , libjpeg-dev endif ifneq (,$(filter libxml, $(SYSTEM_STUFF))) BUILD_DEPS += , libxml2-dev, libxml2-utils BUILD_DEPS += , libxslt1-dev else CONFIGURE_FLAGS += --without-system-libxml endif ifneq (,$(filter xmlsec, $(SYSTEM_STUFF))) BUILD_DEPS += , libxmlsec1-dev (>= 1.2.35) ifneq ($(BOOKWORM_BACKPORT),y) ifneq (,$(filter $(OOO_CHECK_ARCHS),$(filter-out i386,$(OOO_32BIT_ARCHS)))) BUILD_DEPS_ARCH += , libxmlsec1-dev (>= 1.2.39-5) [$(filter $(OOO_CHECK_ARCHS),$(filter-out i386,$(OOO_32BIT_ARCHS)))] endif endif endif ifneq (,$(filter expat, $(SYSTEM_STUFF))) BUILD_DEPS += , libexpat1-dev endif ifneq (,$(filter odbc, $(SYSTEM_STUFF))) BUILD_DEPS += , unixodbc-dev endif ifneq (,$(filter sane, $(SYSTEM_STUFF))) BUILD_DEPS += , libsane-dev endif ifneq (,$(filter libpng, $(SYSTEM_STUFF))) BUILD_DEPS += , libpng-dev endif # otherwise librdf0-dev (which we also need) is uninstallable... ifeq ($(BOOKWORM_BACKPORT),y) CURL_SECTYPE=gnutls else # ... from trixie onwards it seems it has an alternative which allows openssl CURL_SECTYPE=openssl endif ifeq "$(ENABLE_CURL)" "y" ifneq (,$(filter curl, $(SYSTEM_STUFF))) BUILD_DEPS += , libcurl4-$(CURL_SECTYPE)-dev endif else CONFIGURE_FLAGS += --disable-curl endif ifneq (,$(filter box2d, $(SYSTEM_STUFF))) BUILD_DEPS += , libbox2d-dev endif ifneq (,$(filter libwebp, $(SYSTEM_STUFF))) BUILD_DEPS += , libwebp-dev endif ifneq (,$(filter libtiff, $(SYSTEM_STUFF))) BUILD_DEPS += , libtiff-dev endif ifneq ($(ENABLE_COINMP),y) CONFIGURE_FLAGS += --disable-coinmp else ifneq (,$(filter coinmp, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , coinor-libcoinmp-dev $(COINMP_MINVER), coinor-libcoinutils-dev $(COINUTILS_MINVER) endif endif ifneq (,$(filter amd64,$(DEB_HOST_ARCH))) ifneq "$(AUTOPKGTEST_BUILD)" "y" SMALL_SYMBOLS = n endif endif # silence long-obsolete warnings. Should probably be in # upstreams makefiles but I failed to get it actually appear... ifeq "$(DEB_HOST_ARCH)" "armel" DEB_CXXFLAGS_MAINT_APPEND = -Wno-psabi endif ifeq "$(DEB_HOST_ARCH)" "armhf" DEB_CXXFLAGS_MAINT_APPEND = -Wno-psabi endif # see https://lists.freedesktop.org/archives/libreoffice/2023-September/090877.html ifneq (,$(filter ppc64el s390x,$(DEB_HOST_ARCH))) DEB_CFLAGS_MAINT_APPEND = -ffp-contract=off DEB_CXXFLAGS_MAINT_APPEND = -ffp-contract=off endif ifneq (,$(filter s390x,$(DEB_HOST_ARCH))) ifeq (,$(shell gcc -v 2>&1 | grep disable-s390-excess-float-precision)) DEB_CFLAGS_MAINT_APPEND = -fexcess-precision=fast # the gcc manpage says # "-fexcess-precision=standard is not implemented for languages other than C" # but it works with this and fails without, so probably has some effect after all DEB_CXXFLAGS_MAINT_APPEND = -fexcess-precision=fast endif endif ifeq "$(ENABLE_SYMBOLS)" "y" # Small symbols? ifeq "$(SMALL_SYMBOLS)" "y" CONFIGURE_FLAGS += --enable-symbols=SMALL DEB_CFLAGS_MAINT_STRIP += -g DEB_CXXFLAGS_MAINT_STRIP += -g DEB_CFLAGS_MAINT_PREPEND += -g1 DEB_CXXFLAGS_MAINT_PREPEND += -g1 export DEB_CFLAGS_MAINT_STRIP DEB_CXXFLAGS_MAINT_STRIP export DEB_CFLAGS_MAINT_PREPEND DEB_CXXFLAGS_MAINT_PREPEND else CONFIGURE_FLAGS += --enable-symbols endif else DEB_CFLAGS_MAINT_STRIP := -g DEB_CXXFLAGS_MAINT_STRIP := -g export DEB_CFLAGS_MAINT_STRIP DEB_CXXFLAGS_MAINT_STRIP endif export DPKG_EXPORT_BUILDFLAGS=y include /usr/share/dpkg/buildflags.mk ifeq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS))) CONFIGURE_FLAGS += --enable-debug endif ifeq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CONFIGURE_FLAGS += --disable-optimized endif ifeq "$(ENABLE_PYTHON)" "y" PYMAJOR:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[0])") PYMINOR:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[1])") PYMINORPLUS1:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[1]+1)") PYTHON_SITE:=$(shell $(PYTHON) -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())') endif BUILD_DEPS += , $(PYTHON) ifeq "$(ENABLE_PYTHON)" "y" BUILD_DEPS += , $(PYTHON)-dev BUILD_DEPS += , $(PYTHON)-setuptools BUILD_DEPS += , dh-python ifeq "$(RUN_MAKE_CHECK)" "y" ifneq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) BUILD_DEPS_ARCH += , $(PYTHON)-lxml$(OOO_NO_CHECK_ARCHS) else CONFIGURE_FLAGS += --without-lxml endif endif endif BUILD_DEPS += , debhelper-compat (= 12) ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS_ARCH += , locales$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , gdb$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , fontconfig [$(OOO_AUTOPKGTEST_ARCHS)] ifeq ($(BOOKWORM_BACKPORT),y) BUILD_DEPS_ARCH += , fonts-liberation2 [$(OOO_AUTOPKGTEST_ARCHS)] else BUILD_DEPS_ARCH += , fonts-liberation (>= 1:2) [$(OOO_AUTOPKGTEST_ARCHS)] endif ifneq "$(BOOKWORM_BACKPORT)" "y" BUILD_DEPS_ARCH += , fonts-crosextra-carlito (>= 20230309) [$(OOO_AUTOPKGTEST_ARCHS)] else BUILD_DEPS_ARCH += , fonts-crosextra-carlito (<< 20230309) [$(OOO_AUTOPKGTEST_ARCHS)] endif # porrst.cxx:85:Assertion #Test name: (anonymous namespace)::testFloattableAnchorHeight::TestBody #equality assertion failed #- Expected: 1 #- Actual : 2 BUILD_DEPS_ARCH += , fonts-crosextra-caladea [$(OOO_AUTOPKGTEST_ARCHS)] # https://lists.freedesktop.org/archives/libreoffice/2017-May/077764.html BUILD_DEPS_ARCH += , fonts-dejavu [$(OOO_AUTOPKGTEST_ARCHS)] # used in vcl/qa/cppunit/text.cxx:void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs() BUILD_DEPS_ARCH += , fonts-hosny-amiri [$(OOO_AUTOPKGTEST_ARCHS)] # sdext/source/pdfimport/test/tests.cxx (the test PDF uses NaskhArabic) and the result of the import is # checked which fails without the font. Also used in /vcl/qa/cppunit/complextext.cxx (VclComplexTextTest::testCaching()) BUILD_DEPS_ARCH += , fonts-noto-core [$(OOO_AUTOPKGTEST_ARCHS)] # FIXME: Linux Libertine G (does fonts-linuxlibertine even contain it?, I don't see the _G files?) # now is used in test documents. # now we get a abort if fonts is not found and replaced in layout tests (even though # https://cgit.freedesktop.org/libreoffice/core/commit/?id=172270a8f04388a8f8062f672f9c3f3144a01a1f suggests that # it isn't the case in --without-fonts) but... And while we disable that abort via patch having this # to be sure there is no other failure mode makes sense (as with the other fonts above) BUILD_DEPS_ARCH += , fonts-linuxlibertine [$(OOO_AUTOPKGTEST_ARCHS)] # 17:35 <@sberg_> vmiklos, oh, what kind of poor test is that? "warn:sal.osl:3785:2:sal/osl/unx/process.cxx:344: ChildStatusProc : starting 'pstoedit' failed" etc. is what I see in workdir/CppunitTest/filter_eps_test.test.log... BUILD_DEPS_ARCH += , pstoedit$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , imagemagick$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , ghostscript$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , hunspell-en-us$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , hyphen-en-us$(OOO_NO_CHECK_ARCHS) # for test_tdf159102_smart_justify_with_automatic_hyphenation. # The test itself claims the test must not depend on the installed hyphenation patterns # but installing this (which is suggested by writer as missing even after # opening the .fodt) fixes it BUILD_DEPS_ARCH += , hyphen-es$(OOO_NO_CHECK_ARCHS) endif # we don't run any cppunit check in all builds ifneq "$(AUTOPKGTEST_BUILD)" "y" ifneq (,$(filter cppunit, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libcppunit-dev # without the deterministic order patch the xmlsecurity_signing test fails. See # https://cgit.freedesktop.org/libreoffice/core/commit/external/cppunit/order.patch.0?id=2f2246d22e2a8ccbc1dc3e6f5243734a61edf270 ifeq "$(ENABLE_LTO)" "y" BUILD_DEPS_ARCH += , libcppunit-dev (>= 1.15.1-4) [$(filter $(OOO_CHECK_ARCHS),$(OOO_ARCHS))] endif endif ifeq ($(MAKECMDGOALS),binary-indep) CONFIGURE_FLAGS_INDEP += --without-cppunit endif endif ifeq "$(ENABLE_JUNIT4)" "y" BUILD_DEPS += , junit4 $(JUNIT_MIN_VER) [$(OOO_JUNIT_ARCHS)] else CONFIGURE_FLAGS += --without-junit endif ifeq "$(ENABLE_EXPORT_VALIDATION_TESTS)" "y" BUILD_DEPS += , libofficeotron-java$(OOO_NO_CHECK_ARCHS) , libodfvalidator-java$(OOO_NO_CHECK_ARCHS) else CONFIGURE_FLAGS += --without-export-validation endif ifneq "$(BUILD_ONLY_EN_US)" "y" ifeq (lang=,$(findstring lang=,$(DEB_BUILD_OPTIONS))) ISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') ifeq "$(ENABLE_HELP)" "n" HELPISOS= else HELPISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') endif LANGPACKISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g') else # Note that the first one here *has to be* en-US. the first one gets # gid_Module_Root as filelist later and the rest gid_Module_Root.$iso # but we can't/shouldn't do dynamic switching, so let en-US be the first # one to that gid_Module_Root always is english and the other langpacks # have gid_Module_Root.$iso #ISOS=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') ISOS:=en-US af am ar as ast be bg bn bn-IN br bs ca ca-valencia cs cy da de dz el \ en-GB en-ZA eo es et eu fa fi fr ga gd gl gu gug he hi hr hu hy id is it ja \ ka kk km kmr-Latn kn ko lt lv mk mn ml mr nb ne nl nn nr nso oc om or \ pa-IN pl pt pt-BR ro ru rw si sk sl sr sr-Latn ss st sv szl \ ta te tg th tn tr ts ug uk uz ve vi xh zh-CN zh-TW zu ifeq "$(ENABLE_HELP)" "n" HELPISOS:= else #HELPISOS:=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') HELPISOS:=en-US ca ca-valencia cs da de dz el en-GB es et eu fi fr gl hi hu id it \ ja km ko nl om pl pt pt-BR ru sk sl sv tr vi zh-CN zh-TW endif #LANGPACKISOS:=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all') LANGPACKISOS:=en-US af am ar as ast be bg bn bn-IN br bs ca ca-valencia cs cy da de dz el \ en-GB en-ZA eo es et eu fa fi fr ga gd gl gu gug he hi hr hu hy id is it ja \ ka kk km kmr-Latn kn ko lt lv mk mn ml mr nb ne nl nn nr nso oc om or \ pa-IN pl pt pt-BR ro ru rw si sk sl sr sr-Latn ss st sv szl \ ta te tg th tn tr ts ug uk uz ve vi xh zh-CN zh-TW zu endif else ISOS=en-US ifeq "$(ENABLE_HELP)" "n" HELPISOS= else HELPISOS=en-US endif LANGPACKISOS=en-US endif BUILD_ISOS = $(ISOS) ifneq "$(BUILD_ONLY_EN_US)" "y" ifneq "$(BUILD_ISOS)" "en-US" CONFIGURE_FLAGS_LANG += --with-lang="$(BUILD_ISOS)" CONFIGURE_FLAGS_INDEP += $(CONFIGURE_FLAGS_LANG) BUILD_DEPS_INDEP += , gettext endif endif ifeq "$(ENABLE_JAVA)" "y" ifeq ($(BOOKWORM_BACKPORT),y) BUILD_DEPS += , java-common else BUILD_DEPS += , java-common (>= 0.75) endif BUILD_DEPS += , maven-repo-helper$(OOO_NO_JAVA_ARCHS) ifeq "$(JDK)" "default" JAVA_HOME=/usr/lib/jvm/default-java DEFAULT_JDK := $(call java_dependency, default-jdk) # build-depend on 1.9 (upstream needs it anyway for module-info support) BUILD_DEPS += , $(shell echo $(DEFAULT_JDK) | sed -e 's/default-jdk/default-jdk (>= 2:1.9)/' | sed -e 's/\]/$(foreach i,$(JAVA_BRIDGE_BROKEN_ARCHS), !$(i))\]/') endif ifeq "$(JDK)" "openjdk" BUILD_DEPS += , openjdk-$(JAVA_MAINVER)-jdk JAVA_HOME=/usr/lib/jvm/java-$(JAVA_MAINVER)-openjdk-$(DEB_HOST_ARCH) endif TEST_JAVA_HOME=$(JAVA_HOME) ifeq "$(ENABLE_MEDIAWIKI)" "y" BUILD_DEPS_INDEP += , ant$(OOO_NO_JAVA_ARCHS) , ant-optional$(OOO_NO_JAVA_ARCHS) else # report-builder is done in build-arch already ifneq (,$(filter jfreereport, $(SYSTEM_STUFF))) BUILD_DEPS += , ant$(OOO_NO_JAVA_ARCHS) else BUILD_DEPS_INDEP += , ant$(OOO_NO_JAVA_ARCHS) endif endif JAVA_RUNTIME_DEPENDS = default-jre (>= 2:1.$(JAVA_RUNTIME_BASELINE)) JAVA_RUNTIME_DEPENDS += | java-runtime (>= $(JAVA_RUNTIME_BASELINE)) | java$(JAVA_RUNTIME_BASELINE)-runtime # Suns Java "packages" JAVA_RUNTIME_DEPENDS += | jre export JAVA_HOME CONFIGURE_FLAGS += --with-jdk-home=$(JAVA_HOME) JAVA_COMMON_DEPENDS= , libreoffice-java-common JAVA_COMMON_DEPENDS_VERSION:= (>= $(BASE_VERSION)~) ifeq "$(ENABLE_MEDIAWIKI)" "y" CONFIGURE_FLAGS_INDEP += --enable-ext-wiki-publisher endif ifeq "$(ENABLE_REPORTBUILDER)" "y" # report-builder ifneq (,$(filter jfreereport, $(SYSTEM_STUFF))) REPORT_BUILDER_BUILD_DEPS += , libbase-java$(OOO_NO_REPORTBUILDER_ARCHS) , libsac-java$(OOO_NO_REPORTBUILDER_ARCHS) , libxml-java$(OOO_NO_REPORTBUILDER_ARCHS) , libflute-java$(OOO_NO_REPORTBUILDER_ARCHS) , libpentaho-reporting-flow-engine-java$(OOO_NO_REPORTBUILDER_ARCHS) , liblayout-java$(OOO_NO_REPORTBUILDER_ARCHS) , libloader-java$(OOO_NO_REPORTBUILDER_ARCHS) , libformula-java$(OOO_NO_REPORTBUILDER_ARCHS) , librepository-java$(OOO_NO_REPORTBUILDER_ARCHS) , libfonts-java$(OOO_NO_REPORTBUILDER_ARCHS) , libserializer-java$(OOO_NO_REPORTBUILDER_ARCHS) REPORT_BUILDER_JAR_DEPENDS := , libbase-java, libsac-java, libxml-java, libflute-java, libpentaho-reporting-flow-engine-java, liblayout-java, libloader-java, libformula-java, librepository-java, libfonts-java, libserializer-java CONFIGURE_FLAGS += --with-libbase-jar=/usr/share/java/libbase.jar --with-libxml-jar=/usr/share/java/libxml.jar --with-flute-jar=/usr/share/java/flute.jar --with-jfreereport-jar=/usr/share/java/flow-engine.jar --with-liblayout-jar=/usr/share/java/liblayout.jar --with-libloader-jar=/usr/share/java/libloader.jar --with-libformula-jar=/usr/share/java/libformula.jar --with-librepository-jar=/usr/share/java/librepository.jar --with-libfonts-jar=/usr/share/java/libfonts.jar --with-libserializer-jar=/usr/share/java/libserializer.jar endif BUILD_DEPS += $(REPORT_BUILDER_BUILD_DEPS) else CONFIGURE_FLAGS += --disable-report-builder endif ifeq "$(ENABLE_NLPSOLVER)" "y" CONFIGURE_FLAGS_INDEP += --enable-ext-nlpsolver endif OOO_OFFICEBEAN_DEP = libofficebean-java BUILD_DEPS += , javahelper $(JAVAHELPER_MIN_VERSION)$(OOO_NO_JAVA_ARCHS) else CONFIGURE_FLAGS += --without-java DEBHELPER_OPTIONS += -Nlibofficebean-java -Nlibreoffice-java-common -Nlibreoffice-script-provider-bsh -Nlibreoffice-script-provider-js -Nlibreoffice-subsequentcheckbase -Nlibunoloader-java -Nliblibreoffice-java -Nlibreoffice-sdbc-hsqldb -Nure-java endif ifeq "$(ENABLE_JAVA)" "y" ifeq "$(shell $(JAVA_HOME)/bin/java -version 2>&1 | grep -q Zero && echo true)" "true" RUN_MAKE_CHECK:=n ENABLE_JUNIT4=n endif endif ifeq "$(ENABLE_NSS)" "y" ifneq (,$(filter nss, $(SYSTEM_STUFF))) BUILD_DEPS+= , libnss3-dev BUILD_DEPS+= , libnspr4-dev else CONFIGURE_FLAGS += --without-system-nss endif else CONFIGURE_FLAGS += --disable-nss endif ifneq (,$(filter hunspell, $(SYSTEM_STUFF))) BUILD_DEPS += , libhunspell-dev endif CONFIGURE_FLAGS += --with-external-dict-dir=$(DICT_DIR) ifneq (,$(filter altlinuxhyph, $(SYSTEM_STUFF))) BUILD_DEPS += , libhyphen-dev endif CONFIGURE_FLAGS += --with-external-hyph-dir=$(HYPH_DIR) ifneq (,$(filter boost, $(SYSTEM_STUFF))) ifneq "$(BOOST_VERSION)" "default" BUILD_DEPS += , libboost$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-date-time$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-iostreams$(BOOST_VERSION)-dev, libboost-filesystem$(BOOST_VERSION)-dev, libboost-locale$(BOOST_VERSION)-dev #BUILD_DEPS += , libboost-thread$(BOOST_VERSION)-dev, libboost-program-options$(BOOST_VERSION)-dev ifeq (,$(filter orcus, $(SYSTEM_STUFF))) BUILD_DEPS += , libboost-system$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-iostreams$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-program-options$(BOOST_VERSION)-dev $(BOOST_MINVER), libboost-filesystem$(BOOST_VERSION)-dev $(BOOST_MINVER) endif else BUILD_DEPS += , libboost-dev $(BOOST_MINVER), libboost-date-time-dev $(BOOST_MINVER), libboost-iostreams-dev $(BOOST_MINVER), libboost-filesystem-dev $(BOOST_MINVER), libboost-locale-dev $(BOOST_MINVER) #BUILD_DEPS += , libboost-thread-dev, libboost-program-options-dev ifeq (,$(filter orcus, $(SYSTEM_STUFF))) BUILD_DEPS += , libboost-system-dev $(BOOST_MINVER), libboost-iostreams-dev $(BOOST_MINVER), libboost-program-options-dev $(BOOST_MINVER), libboost-filesystem-dev $(BOOST_MINVER) endif endif ifeq "$(shell if [ -e /usr/lib/$(DEB_HOST_MULTIARCH)/libboost_date_time.so ]; then echo true; fi)" "true" CONFIGURE_FLAGS += --with-boost-libdir=/usr/lib/$(DEB_HOST_MULTIARCH) endif ifneq (,$(filter dragonbox, $(SYSTEM_STUFF))) BUILD_DEPS += , libdragonbox-dev endif ifneq (,$(filter libfixmath, $(SYSTEM_STUFF))) BUILD_DEPS += , libfixmath-dev endif endif ifneq "$(ENABLE_SKIA)" "y" CONFIGURE_FLAGS += --disable-skia endif ifneq (,$(filter mdds, $(SYSTEM_STUFF))) BUILD_DEPS += , libmdds-dev (>= 2.1), libmdds-dev (<< 2.2~) endif ifneq (,$(filter orcus, $(SYSTEM_STUFF))) BUILD_DEPS += , liborcus-dev (>= 0.19.1), liborcus-dev (<< 0.20~) ifneq ($(BOOKWORM_BACKPORT),y) ifneq (,$(filter $(OOO_CHECK_ARCHS),$(filter-out i386,$(OOO_32BIT_ARCHS)))) BUILD_DEPS_ARCH += , liborcus-dev (>> 0.19.2-3+b1) [$(filter $(OOO_CHECK_ARCHS),$(filter-out i386,$(OOO_32BIT_ARCHS)))] endif endif endif ifeq "$(ENABLE_XMLHELP)" "y" ifneq (,$(filter clucene, $(SYSTEM_STUFF))) BUILD_DEPS += , libclucene-dev endif endif ifeq "$(USE_EXTERNAL_CXXLIBS)" "y" ifneq (,$(filter librevenge, $(SYSTEM_STUFF))) BUILD_DEPS += , librevenge-dev, librevenge-dev (<< 0.1~) endif ifneq (,$(filter libwpd, $(SYSTEM_STUFF))) BUILD_DEPS += , libwpd-dev (>= 0.10), libwpd-dev (<< 0.11~) endif ifneq (,$(filter mythes, $(SYSTEM_STUFF))) BUILD_DEPS += , libmythes-dev endif ifneq (,$(filter libwps, $(SYSTEM_STUFF))) BUILD_DEPS += , libwps-dev (>= 0.4), libwps-dev (<< 0.5~) endif ifneq (,$(filter libwpg, $(SYSTEM_STUFF))) BUILD_DEPS += , libwpg-dev (>= 0.3), libwpg-dev (<< 0.4~) endif ifneq (,$(filter libvisio, $(SYSTEM_STUFF))) BUILD_DEPS += , libvisio-dev (>= 0.1), libvisio-dev (<< 0.2~) endif ifneq (,$(filter libcdr, $(SYSTEM_STUFF))) BUILD_DEPS += , libcdr-dev (>= 0.1), libcdr-dev (<< 0.2~) endif ifneq (,$(filter libmspub, $(SYSTEM_STUFF))) BUILD_DEPS += , libmspub-dev (>= 0.1), libmspub-dev (<< 0.2~) endif ifneq (,$(filter libmwaw, $(SYSTEM_STUFF))) # BUILD_DEPS += , libmwaw-dev (>= 0.3.1), libmwaw-dev (<< 0.4~) # configure.ac checks for >= 0.3.21 BUILD_DEPS += , libmwaw-dev (>= 0.3.21), libmwaw-dev (<< 0.4~) # ifeq "$(RUN_MAKE_CHECK)" "y" # BUILD_DEPS_ARCH += , libmwaw-dev (>= 0.3.21)$(OOO_NO_CHECK_ARCHS) # endif endif ifneq (,$(filter libodfgen, $(SYSTEM_STUFF))) BUILD_DEPS += , libodfgen-dev (>= 0.1), libodfgen-dev (<< 0.2~) endif ifneq (,$(filter libepubgen, $(SYSTEM_STUFF))) BUILD_DEPS += , libepubgen-dev (>= 0.1.0), libepubgen-dev (<< 0.2~) endif ifneq (,$(filter libetonyek, $(SYSTEM_STUFF))) BUILD_DEPS += , libetonyek-dev, libetonyek-dev (<< 0.2~) endif ifneq (,$(filter libfreehand, $(SYSTEM_STUFF))) BUILD_DEPS += , libfreehand-dev (>= 0.1), libfreehand-dev (<< 0.2~) endif ifneq (,$(filter libabw, $(SYSTEM_STUFF))) BUILD_DEPS += , libabw-dev (>= 0.1), libabw-dev (<< 0.2~) endif ifneq (,$(filter libpagemaker, $(SYSTEM_STUFF))) BUILD_DEPS += , libpagemaker-dev, libpagemaker-dev (<< 0.1~) endif ifneq (,$(filter libzmf, $(SYSTEM_STUFF))) BUILD_DEPS += , libzmf-dev, libzmf-dev (<< 0.1~) endif ifneq (,$(filter libstaroffice, $(SYSTEM_STUFF))) BUILD_DEPS += , libstaroffice-dev, libstaroffice-dev (<< 0.1~) endif ifneq (,$(filter libqxp, $(SYSTEM_STUFF))) BUILD_DEPS += , libqxp-dev, libqxp-dev (<< 0.1~) endif ifneq (,$(filter libebook, $(SYSTEM_STUFF))) BUILD_DEPS += , libe-book-dev (>= 0.1), libe-book-dev (<< 0.2~) endif ifeq "$(ENABLE_LIBCMIS)" "y" ifneq (,$(filter libcmis, $(SYSTEM_STUFF))) BUILD_DEPS += , libcmis-dev (>= 0.6.1~), libcmis-dev (<< 0.7~) endif else CONFIGURE_FLAGS += --disable-libcmis endif ifeq "$(ENABLE_ZXING)" "y" ifneq (,$(filter zxing, $(SYSTEM_STUFF))) BUILD_DEPS += , libzxing-dev endif else CONFIGURE_FLAGS += --disable-zxing endif endif CONFIGURE_FLAGS += --with-external-thes-dir=$(THES_DIR) ifneq (,$(filter zxcvbn, $(SYSTEM_STUFF))) BUILD_DEPS += , libzxcvbn-dev endif ifeq "$(INSTALL_APPARMOR_PROFILES)" "y" BUILD_DEPS_INDEP += , dh-apparmor ifeq "$(CHECK_APPARMOR_PROFILES)" "true" BUILD_DEPS_INDEP += , apparmor endif endif ifeq "$(ENABLE_EOT)" "y" CONFIGURE_FLAGS += --enable-eot ifneq (,$(filter libeot, $(SYSTEM_STUFF))) BUILD_DEPS += , libeot-dev endif endif ifneq (,$(filter lcms2, $(SYSTEM_STUFF))) BUILD_DEPS += , liblcms2-dev endif ifneq (,$(filter openldap, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libldap-dev endif ifneq (,$(filter liblangtag, $(SYSTEM_STUFF))) BUILD_DEPS += , liblangtag-dev endif ifneq (,$(filter icu, $(SYSTEM_STUFF))) BUILD_DEPS += , libicu-dev endif ifeq "$(BUILD_CAIROCANVAS)" "y" ifneq (,$(filter cairo, $(SYSTEM_STUFF))) BUILD_DEPS+= , libcairo2-dev endif else CONFIGURE_FLAGS+= --disable-cairo endif ifeq "$(ENABLE_KF5)" "y" CONFIGURE_FLAGS += --enable-kf5 BUILD_DEPS_ARCH += , libkf5coreaddons-dev, libkf5i18n-dev, libkf5config-dev, libkf5windowsystem-dev, libkf5kio-dev endif ifeq "$(ENABLE_KF6)" "y" CONFIGURE_FLAGS += --enable-kf6 BUILD_DEPS_ARCH += , libkf6coreaddons-dev, libkf6i18n-dev, libkf6config-dev, libkf6windowsystem-dev, libkf6kio-dev endif PLASMA_ICONSET_DEP=libreoffice-style-breeze ifeq "$(ENABLE_QT5)" "y" CONFIGURE_FLAGS += --enable-qt5 BUILD_DEPS_ARCH += , qtbase5-dev $(QT5_MINVER), qt5-qmake $(QT5_MINVER), qtbase5-dev-tools $(QT5_MINVER) BUILD_DEPS_ARCH += , libqt5x11extras5-dev $(QT5_MINVER) BUILD_DEPS_ARCH += , libglib2.0-dev BUILD_DEPS_ARCH += , libxcb1-dev endif ifeq "$(ENABLE_QT6)" "y" CONFIGURE_FLAGS += --enable-qt6 BUILD_DEPS_ARCH += , qt6-base-dev $(QT6_MINVER), qmake6 $(QT6_MINVER), qt6-base-dev-tools $(QT6_MINVER) BUILD_DEPS_ARCH += , libxcb1-dev endif ifeq "$(ENABLE_MARIADB)" "y" ifeq "$(MYSQL_FLAVOUR)" "default" BUILD_DEPS_ARCH += , default-libmysqlclient-dev else ifeq "$(MYSQL_FLAVOUR)" "mysql" ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libmysqlclient-dev endif MARIADBCONFIG=/usr/bin/mysql_config endif ifeq "$(MYSQL_FLAVOUR)" "mariadb" ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libmariadb-dev endif MARIADBCONFIG=/usr/bin/mariadb_config endif endif else CONFIGURE_FLAGS += --disable-mariadb-sdbc DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-mysql endif ifeq "$(ENABLE_FIREBIRD)" "y" BASE_FIREBIRD_RECOMMENDS = libreoffice-sdbc-firebird [$(OOO_FIREBIRD_ARCHS)] ifneq (,$(filter libatomic-ops, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libatomic-ops-dev$(OOO_NO_FIREBIRD_ARCHS) endif ifneq (,$(filter libtommath, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libtommath-dev$(OOO_NO_FIREBIRD_ARCHS) endif ifneq (,$(filter firebird, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , firebird-dev$(OOO_NO_FIREBIRD_ARCHS) # we need libEngine12.so ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS_ARCH += , firebird3.0-server-core $(OOO_NO_FIREBIRD_ARCHS) endif FIREBIRD_ENGINE_DEPENDS += firebird3.0-server-core endif else CONFIGURE_FLAGS += --disable-firebird-sdbc DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-firebird endif ifeq "$(BUILD_GTK3)" "y" BUILD_DEPS_ARCH += , libgtk-3-dev, libglib2.0-dev ifneq (cairo,$(findstring cairo,$(SYSTEM_STUFF))) $(error GTK3 build fails without system-cairo!!) endif ifeq (,$(filter epoxy, $(SYSTEM_STUFF))) BUILD_DEPS += , libegl1-mesa-dev endif GNOME_GTK_RECOMMENDS += libreoffice-gtk3 ifeq "$(ENABLE_INTROSPECTION)" "y" BUILD_DEPS_ARCH += , gobject-introspection , libgirepository1.0-dev CONFIGURE_FLAGS += --enable-introspection else DEBHELPER_OPTIONS+= -Ngir1.2-lokdocview-0.1 endif ifeq "$(ENABLE_ATSPI_TESTS)" "y" # make sure it is enabled; it is auto-enabled if the below is there, though CONFIGURE_FLAGS_TESTS += --enable-atspi-tests BUILD_DEPS_ARCH += , libatspi2.0-dev$(OOO_NO_CHECK_ARCHS) , at-spi2-core$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , xvfb$(OOO_NO_CHECK_ARCHS) , xauth$(OOO_NO_CHECK_ARCHS) , dbus-x11$(OOO_NO_CHECK_ARCHS) else # explicitely disable it if not wanted as t is auto-enabled if the above is there CONFIGURE_FLAGS += --disable-atspi-tests endif else CONFIGURE_FLAGS += --disable-gtk3 endif ifeq "$(BUILD_GTK4)" "y" ifneq "$(BOOKWORM_BACKPORT)" "y" # go sure, needed for e.g. accessibility GTK4_MINVER := (>= 4.10) endif BUILD_DEPS_ARCH += , libgtk-4-dev $(GTK4_MINVER), libglib2.0-dev, libcairo2-dev, libatk1.0-dev CONFIGURE_FLAGS += --enable-gtk4 endif ifeq "$(ENABLE_EVO2)" "n" CONFIGURE_FLAGS += --disable-evolution2 #DEBHELPER_OPTIONS += -Nlibreoffice-evolution else CONFIGURE_FLAGS += --enable-evolution2 BUILD_DEPS_ARCH += , libebook1.2-dev LIBEBOOK_DEP = $(shell debian/scripts/get_libebook_dep.sh) endif ifeq "$(ENABLE_SDBC_POSTGRESQL)" "y" ifneq (,$(filter postgresql, $(SYSTEM_STUFF))) BUILD_DEPS += , libkrb5-dev BUILD_DEPS_ARCH += , libpq-dev else BUILD_DEPS += , libkrb5-dev endif else CONFIGURE_FLAGS += --disable-postgresql-sdbc DEBHELPER_OPTIONS += -Nlibreoffice-sdbc-postgresql endif ifeq "$(ENABLE_RANDR)" "y" BUILD_DEPS += , libxrandr-dev else CONFIGURE_FLAGS += --disable-randr endif ifneq "$(ENABLE_PYTHON)" "y" DEBHELPER_OPTIONS+= -Npython3-uno -Nlibreoffice-script-provider-python -Npython3-access2base -Npython3-scriptforge CONFIGURE_FLAGS += --disable-python else PYUNO_DEPENDS = python3-uno CONFIGURE_FLAGS += --enable-python=system endif ifneq "$(PACKAGE_LIBRELOGO)" "y" DEBHELPER_OPTIONS+= -Nlibreoffice-librelogo CONFIGURE_FLAGS += --disable-librelogo endif ifeq "$(ENABLE_JAVA)" "y" ifneq (,$(filter hsqldb, $(SYSTEM_STUFF))) #HSQLDB_MINVER= HSQLDB_JAR=/usr/share/java/hsqldb1.8.0.jar BUILD_DEPS += , libhsqldb1.8.0-java $(HSQLDB_MINVER)$(OOO_NO_JAVA_ARCHS) , libarchive-zip-perl$(OOO_NO_JAVA_ARCHS) BASE_HSQLDB_DEPENDS = libhsqldb1.8.0-java $(HSQLDB_MINVER) CONFIGURE_FLAGS += --with-hsqldb-jar=$(HSQLDB_JAR) else BUILD_DEPS += , libservlet3.1-java endif ifeq "$(ENABLE_SCRIPT_PROVIDER_BSH)" "y" ifneq (,$(filter beanshell, $(SYSTEM_STUFF))) BUILD_DEPS += , libbsh-java endif CONFIGURE_FLAGS += --enable-scripting-beanshell else CONFIGURE_FLAGS += --disable-scripting-beanshell DEBHELPER_OPTIONS += -Nlibreoffice-script-provider-bsh endif ifeq "$(ENABLE_SCRIPT_PROVIDER_JS)" "y" CONFIGURE_FLAGS += --enable-scripting-javascript else CONFIGURE_FLAGS += --disable-scripting-javascript DEBHELPER_OPTIONS += -Nlibreoffice-script-provider-js endif endif ifeq ($(ENABLE_LPSOLVE),y) ifneq (,$(filter lpsolve, $(SYSTEM_STUFF))) ifeq "$(USE_SHARED_LPSOLVE)" "y" BUILD_DEPS_ARCH += , liblpsolve55-dev $(LPSOLVE_MIN_VERSION), lp-solve $(LPSOLVE_MIN_VERSION) LPSOLVE_DEP = lp-solve $(LPSOLVE_MIN_VERSION) else BUILD_DEPS += , liblpsolve55-dev $(LPSOLVE_MIN_VERSION) endif BUILD_DEPS += , libsuitesparse-dev $(SUITESPARSE_MIN_VERSION) endif else CONFIGURE_FLAGS += --disable-lpsolve endif ifeq "$(USE_DBUS)" "y" BUILD_DEPS_ARCH += , libdbus-1-dev ifeq "$(ENABLE_BLUETOOTH)" "y" BUILD_DEPS += , libglib2.0-dev ifneq (,$(filter bluez, $(SYSTEM_STUFF))) BUILD_DEPS += , libbluetooth-dev [linux-any] endif else CONFIGURE_FLAGS += --disable-sdremote-bluetooth endif ifeq "$(ENABLE_PACKAGEKIT)" "y" CONFIGURE_FLAGS += --enable-packagekit endif else CONFIGURE_FLAGS += --disable-dbus endif ifeq "$(ENABLE_AVAHI)" "y" BUILD_DEPS_ARCH += , libavahi-client-dev CONFIGURE_FLAGS += --enable-avahi endif ifeq "$(USE_GSTREAMER)" "y" BUILD_DEPS_ARCH += , libgstreamer1.0-dev CONFIGURE_FLAGS += --enable-gstreamer-1-0 BUILD_DEPS_ARCH += , libgstreamer-plugins-base1.0-dev GSTREAMER_PLUGINS_SUGGESTS += , gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-plugins-bad, gstreamer1.0-libav else CONFIGURE_FLAGS += --disable-gstreamer-1-0 endif ifeq "$(ENABLE_WEBDAV)" "y" ifneq (,$(filter curl, $(SYSTEM_STUFF))) BUILD_DEPS += , libcurl4-$(CURL_SECTYPE)-dev endif ENABLE_CURL=y else CONFIGURE_FLAGS += --with-webdav=no endif ENABLE_SAL_OPENSSL_BACKEND=n ifneq "$(ENABLE_SAL_OPENSSL_BACKEND)" "y" ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) ifneq (,$(filter postgresql, $(SYSTEM_STUFF))) CONFIGURE_FLAGS += --disable-openssl endif endif else CONFIGURE_FLAGS += --enable-cipher-openssl-backend SYSTEM_STUFF += openssl BUILD_DEPS += , libssl-dev endif SYSTEM_STUFF += lockfile ifneq (,$(filter lockfile, $(SYSTEM_STUFF))) BUILD_DEPS += , liblockfile-bin endif ifneq (,$(filter frozen, $(SYSTEM_STUFF))) BUILD_DEPS += , libfrozen-dev endif ifneq (,$(filter argon2, $(SYSTEM_STUFF))) BUILD_DEPS += , libargon2-dev endif ifneq (,$(filter redland, $(SYSTEM_STUFF))) BUILD_DEPS += , librdf0-dev endif ifeq "$(ENABLE_GUI)" "y" ifneq (,$(filter epoxy, $(SYSTEM_STUFF))) BUILD_DEPS += , libepoxy-dev else BUILD_DEPS += , libegl1-mesa-dev endif endif ifneq (,$(filter glm, $(SYSTEM_STUFF))) BUILD_DEPS += , libglm-dev endif ifeq "$(ENABLE_GPGMEPP)" "y" ifneq (,$(filter gpgmepp, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH+= , libgpgmepp-dev, libgpgme-dev, libgpg-error-dev endif ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS_ARCH += , gpg$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , gpgconf$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , gpg-agent$(OOO_NO_CHECK_ARCHS) endif else CONFIGURE_FLAGS += --disable-gpgmepp endif ifeq "$(ENABLE_GIO)" "y" ifneq "$(BUILD_GTK3)" "y" BUILD_DEPS_ARCH += , libglib2.0-dev endif else CONFIGURE_FLAGS += --disable-gio endif ifeq "$(ENABLE_DCONF)" "y" BUILD_DEPS += , libdconf-dev (>= 0.40) else CONFIGURE_FLAGS += --disable-dconf endif ifeq ($(ENABLE_MERGELIBS),y) CONFIGURE_FLAGS += --enable-mergelibs endif ifeq ($(ENABLE_LTO),y) CONFIGURE_FLAGS += --enable-lto # see https://lists.debian.org/debian-devel-changes/2021/11/msg02548.html BUILD_DEPS += , binutils (>= 2.37-9) [ppc64] endif ifeq ($(BOOKWORM_BACKPORT),y) LIBERATION_FONT_RECOMMENDS += , fonts-liberation LIBERATION2_FONT_RECOMMENDS += , fonts-liberation2 else LIBERATION_FONT_RECOMMENDS += , fonts-liberation-sans-narrow LIBERATION2_FONT_RECOMMENDS += , fonts-liberation (>= 1:2) endif LIBERATION_FONTS_RECOMMENDS += $(LIBERATION2_FONT_RECOMMENDS) $(LIBERATION_FONT_RECOMMENDS) # go sure. if we explicitely disable LTO when it is enabled we don't want it to sneak in # (and vice-versa). See https://lists.debian.org/debian-devel/2022/06/msg00092.html ifeq ($(ENABLE_LTO),y) export DEB_BUILD_MAINT_OPTIONS=optimize=+lto # honour parallel=X. We can just remove the auto here (coming from dpkg-buildflags) # since upstream already adds -flto=jobserver (honouring PARALLEL already). # Replacing -flto=auto doesn't work since clang doesn't understand -flto=X (except thin) DEB_CFLAGS_MAINT_STRIP += -flto=auto DEB_CXXFLAGS_MAINT_STRIP += -flto=auto DEB_LDFLAGS_MAINT_STRIP += -flto=auto # save space ifeq "$(SMALL_SYMBOLS)" "y" DEB_CFLAGS_MAINT_STRIP += -ffat-lto-objects DEB_CXXFLAGS_MAINT_STRIP += -ffat-lto-objects DEB_LDFLAGS_MAINT_STRIP += -ffat-lto-objects endif export DEB_CFLAGS_MAINT_STRIP DEB_CXXFLAGS_MAINT_STRIP DEB_LDFLAGS_MAINT_STRIP export DEB_CFLAGS_MAINT_APPEND DEB_CXXFLAGS_MAINT_APPEND DEB_LDFLAGS_MAINT_APPEND else export DEB_BUILD_MAINT_OPTIONS=optimize=-lto endif ifeq ($(USE_GOLD),y) CONFIGURE_FLAGS += --enable-ld=gold else # --enable-ld=gold is default for debug builds if found # FIXME: Should we allow gold here nevertheless? configure # prints the following with --disable-ld: # * WARNING : Linker is not capable of creating gdb index, debugger startup will be slow ifeq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS))) ifneq "$(ALLOW_GOLD)" "y" CONFIGURE_FLAGS += --disable-ld endif endif endif ifneq (,$(findstring mips,$(DEB_HOST_ARCH))) #10:46 < _rene_> can anyone shed a light on /<>/workdir/LinkTarget/Executable/bestreversemap: error while loading shared libraries: # /<>/instdir/program/libuno_sal.so.3: ELF file ABI version invalid? both were built in the same LO build #10:47 < _rene_> mips64el, apparently since gcc9 or new(er) binutils? #10:47 < _rene_> on an other binary: #10:47 < _rene_> file /home/rene/libreoffice-6.3.1~rc2/instdir/program/libunoidllo.so # /home/rene/libreoffice-6.3.1~rc2/instdir/program/libunoidllo.so: ELF 64-bit LSB shared object, MIPS, MIPS64 rel2 version 1 (SYSV), # dynamically linked, BuildID[sha1]=82f15433db9000b9dfee24ed07e2082ffb439dfd, with debug_info, not stripped #10:47 < _rene_> (eller, mips64el chroot) #[...] #13:49 < aurel32> _rene_: the problem is the ABI version, ie those library have Version ABI: 5 instead of 0 for normal binaries #13:50 < aurel32> the ABI version 5 will be used for gnu hash support in mips #13:51 < aurel32> support has been added to binutils trunk recently, although the default is still sysv hash style #13:51 < aurel32> and glibc support is still being reviewed, it might land in 2.31 #13:51 < aurel32> previous version of libreoffice used -Wl,--hash-style=sysv #13:52 < aurel32> now it seems it autodetect that binutils has gnu hash support and it passes -Wl,--hash-style=gnu #13:52 < aurel32> but there is no support for the full toolchain yet #13:54 < _rene_> so I need to force -Wl,--hash-style=sysv? #13:54 < aurel32> --with-linker-hash-style #13:54 < aurel32> Use linker with --hash-style=