#!/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-2022 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) #HELP_L10N_VIRTUAL_VERSION:=$(shell echo $(DEB_VERSION_UPSTREAM) | cut -d: -f2 | tr [~] [\\-]) HELP_L10N_VIRTUAL_VERSION:=7.4 OOVER:=7.4 NEXT_OOVER:=$(shell echo "$(OOVER) + 0.1" | bc) 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 DEB_VENDOR=Debian SHELL:=/bin/bash SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(..\..\)\../\1/p' | 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-7-4-7 endif ifeq "$(USE_SOURCE_TARBALLS)" "y" lo_sources_ver=$(shell cat $(CURDIR)/sources.ver | cut -d= -f2) endif ######### # Default package configuration # OOO_ARCHS = alpha amd64 arm64 armel armhf hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el s390 s390x sparc sparc64 PATCHSET=$(DEB_VENDOR) BUILD_DEPS=\ autoconf,\ automake,\ bc,\ bison,\ bzip2,\ flex (>= 2.3.35), \ fontforge-nox | fontforge, \ gperf (>= 3.1),\ libc0.1 (>= 2.10.2-7) [kfreebsd-any],\ libfontconfig-dev,\ pkg-config,\ 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)),) ENABLE_JAVA=y ifeq "$(ENABLE_JAVA)" "y" JDK=default include /usr/share/java/java_defaults.mk ifneq "$(JDK)" "default" JAVA_MAINVER=7 endif endif else ENABLE_JAVA=n endif JAVAHELPER_MIN_VERSION= (>= 0.37~) SYSTEM_STUFF += hunspell SYSTEM_STUFF += altlinuxhyph SYSTEM_STUFF += boost BOOST_VERSION=default ifeq "$(BOOST_VERSION)" "default" BOOST_MINVER= (>= 1.71) endif # 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 ifeq "$(ENABLE_GUI)" "y" BUILD_PLASMA=y ENABLE_QT5=n QT5_MINVER= (>= 5.6) endif ifeq "$(BUILD_PLASMA)" "y" ENABLE_KF5=y # KF5 depends on Qt5 ifeq "$(ENABLE_KF5)" "y" ENABLE_QT5=y KF5_QT5_DEPENDS := libreoffice-qt5 (= $${binary:Version}) endif endif ENABLE_QT6=n # for moc move to /usr/lib/qt6/libxexec QT6_MINVER= (>= 6.2.1+dfsg-2) # 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 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),build-indep) ENABLE_SYMBOLS=y SMALL_SYMBOLS=y endif ifeq ($(MAKECMDGOALS),build-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 SYSTEM_STUFF += lpsolve USE_SHARED_LPSOLVE=y LPSOLVE_MIN_VERSION= (>= 5.5.0.13-5+b1) 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 CURL_SECTYPE=gnutls 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 ENABLE_CHART_TESTS=n # will not work, uses schema/ stripped in the tarballs ifeq "$(USE_SOURCE_TARBALLS)" "y" ENABLE_EXPORT_VALIDATION_TESTS=n endif JUNIT_MIN_VER= (>= 4.8.2-2) USE_LIBSUITESPARSE=y SUITESPARSE_MIN_VERSION= (>= 1:3.4.0) 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" ENABLE_INTROSPECTION=y endif endif # DO NOT ENABLE. WILL NOT WORK. # as of 2021-11-29: # 14:41 < _rene_> caolanm: just wondering after I did a testbuild lately on (then) master: what is the state of gtk4? enable-able (even # though there's no desktop actually using it ttbomk) or better wait? #[...] #14:45 <@caolanm> _rene_, I wouldn't enable it yet. There's too much basic stuff not working well enough yet, e.g. # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4124 BUILD_GTK4=n 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_dark sifr_dark_svg breeze breeze_dark breeze_dark_svg breeze_svg elementary elementary_svg karasa_jaga sukapura sukapura_svg # FIXME IMAGES_PACKAGES=$(subst _,-,$(filter-out colibre_svg,$(filter-out colibre_svg,$(filter-out colibre_dark_svg,$(filter-out sukapura_svg,$(filter-out sifr_dark_svg,$(filter-out breeze_dark_svg,$(filter-out sifr_dark,$(filter-out breeze_dark,$(filter-out breeze_svg,$(filter-out elementary_svg,$(IMAGES)))))))))))) 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=n 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 ifneq (big,$(DEB_HOST_ARCH_ENDIAN)) ENABLE_SKIA=y endif # see https://cgit.freedesktop.org/libreoffice/core/commit/?id=a0edcc68f94915a78fcc08e70d2cdd752abd9ebb ifeq "$(ENABLE_SKIA)" "y" BUILD_DEPS += , libfreetype-dev (>= 2.8.1) else BUILD_DEPS += , libfreetype-dev (>= 2.2.0) 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 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 USE_UCPP=n ifeq "$(USE_UCPP)" "y" SYSTEM_STUFF += ucpp else CONFIGURE_FLAGS += --with-idlc-cpp=cpp endif # 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 # 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 --enable-build-opensymbol \ --without-myspell-dicts \ --with-branding=$(CURDIR)/debian/branding 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 mips64 mips64el ppc64 ppc64el s390x sparc64, $(OOO_ARCHS)) $(eval $(call gen_no_archs,OOO_64BIT_ARCHS)) OOO_BE_ARCHS = $(filter hppa m68k mips mips64 powerpc powerpcspe ppc64 s390 s390x sparc sparc64,$(OOO_ARCHS)) OOO_LE_ARCHS = $(filter-out $(OOO_BE_ARCHS),$(OOO_ARCHS)) $(eval $(call gen_no_archs,OOO_LE_ARCHS)) OOO_CHECK_ARCHS := $(filter-out kfreebsd-i386 kfreebsd-amd64 mips mipsel mips64el armel s390x,$(OOO_ARCHS)) $(eval $(call gen_no_archs,OOO_CHECK_ARCHS)) #OOO_JUNIT_ARCHS := i386 amd64 armhf arm64 OOO_JUNIT_ARCHS := amd64 arm64 $(eval $(call gen_no_archs,OOO_JUNIT_ARCHS)) #OOO_CHECK_FATAL_ARCHS := i386 amd64 armhf arm64 OOO_CHECK_FATAL_ARCHS := amd64 arm64 BUILD_TESTS=y ifeq (nocheck,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) BUILD_TESTS=n 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 "$(ENABLE_JAVA)" "y" ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_JUNIT_ARCHS))) ENABLE_JUNIT4=y endif endif IGNORE_MAKE_CHECK_FAILURES=- TEST_TIMEOUT := timeout --foreground --preserve-status -v -k 250m 200m ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_FATAL_ARCHS))) IGNORE_MAKE_CHECK_FAILURES:= TEST_TIMEOUT:= 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 ifeq "$(JDK)" "default" OOO_JAVA_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_JAVA_ARCHS) $(eval $(call gen_no_archs,OOO_BASE_ARCHS)) OOO_REPORTBUILDER_ARCHS := $(OOO_BASE_ARCHS) $(eval $(call gen_no_archs,OOO_REPORTBUILDER_ARCHS)) OOO_FIREBIRD_ARCHS := $(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)) 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-script-provider-python -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 build-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 Bullseye ifeq "$(DEB_DISTRIBUTION)" "bullseye-backports" BUGS=mailto:debian-backports@lists.debian.org SYSTEM_STUFF := $(filter-out zxing mdds orcus libnumbertext dragonbox libfixmath libmwaw,$(SYSTEM_STUFF)) BULLSEYE_BACKPORT=y ENABLE_LTO=n 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 that doesn't exist so disable LTO there... ifeq "$(ENABLE_LTO)" "y" ifeq "$(DEB_HOST_ARCH)" "mips64el" ENABLE_LTO=n endif BUILD_DEPS += , clang (>= 1:12) [ppc64el] # 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 += , llvm [$(OOO_LE_ARCHS)] else BUILD_DEPS += , llvm-$(CLANG_VERSION)-linker-tools [$(OOO_LE_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 endif BUILD_DEPS += , gcc (>= 4:7), g++ (>= 4:7) # 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 tacked 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 # 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 += , clang (>= 1:8.0.1) [$(filter-out armel ppc64el,$(OOO_LE_ARCHS))] # see #963162, #963167 which apparently don't exist on 11 BUILD_DEPS += , clang (>= 1:11) [armel] else export LO_CLANG_CC=clang-$(CLANG_VERSION) export LO_CLANG_CXX=clang++-$(CLANG_VERSION) BUILD_DEPS += , clang-$(CLANG_VERSION) [$(OOO_LE_ARCHS)] endif endif endif else ifeq "$(CLANG_VERSION)" "default" BUILD_DEPS += , clang (>= 1:8.0.1) 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 "$(USE_DWZ)" "y" BUILD_DEPS += , debhelper (>= 10.10.4) # dwz 0.12-3 claims to have DW_OP_GNU support but still # dwz: debian/libreoffice-core/usr/lib/libreoffice/program/libmergedlo.so: Couldn't find DIE referenced by DW_OP_GNU_parameter_ref # happens BUILD_DEPS += , dwz (>> 0.12-3) endif ifeq "$(PACKAGE_SDK)" "y" CONFIGURE_FLAGS += --enable-odk ifeq "$(PACKAGE_SDK_DOCS)" "y" BUILD_DEPS_INDEP += , doxygen (>= 1.8.4) , graphviz else CONFIGURE_FLAGS += --without-doxygen --without-javadoc endif endif ifeq "$(ENABLE_PDFIMPORT)" "y" ifeq "$(ENABLE_POPPLER)" "y" BUILD_DEPS += , libpoppler-dev (>= 0.14.0), libpoppler-private-dev, libpoppler-cpp-dev BUILD_DEPS_ARCH += , poppler-data$(OOO_NO_CHECK_ARCHS) 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 += , libopenjp2-7-dev endif ifneq (,$(filter abseil, $(SYSTEM_STUFF))) BUILD_DEPS += , libabsl-dev endif endif endif ifneq (,$(filter graphite, $(SYSTEM_STUFF))) BUILD_DEPS += , libgraphite2-dev (>= 0.9.3) endif ifneq (,$(filter harfbuzz, $(SYSTEM_STUFF))) BUILD_DEPS += , libharfbuzz-dev (>= 2.1.0) endif ifneq (,$(filter libexttextcat, $(SYSTEM_STUFF))) BUILD_DEPS += , libexttextcat-dev (>= 3.4.1) TEXTCAT_DATA_RECOMMENDS := libexttextcat-data endif ifneq "$(ENABLE_LDAP)" "y" CONFIGURE_FLAGS += --disable-ldap endif ifneq (,$(filter libnumbertext, $(SYSTEM_STUFF))) BUILD_DEPS += , libnumbertext-dev (>= 1.0.6) # https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-7-3&id=09dfe214a30f58ddcd7a857db8f5eee68d4cef2a BUILD_DEPS_ARCH += , libnumbertext-data (>= 1.0.11) 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 (>= 2.8), libxml2-utils BUILD_DEPS += , libxslt1-dev else CONFIGURE_FLAGS += --without-system-libxml endif ifneq (,$(filter xmlsec, $(SYSTEM_STUFF))) BUILD_DEPS += , libxmlsec1-dev (>= 1.2.28) endif ifneq (,$(filter expat, $(SYSTEM_STUFF))) BUILD_DEPS += , libexpat1-dev endif ifneq (,$(filter odbc, $(SYSTEM_STUFF))) BUILD_DEPS += , unixodbc-dev (>= 2.2.11) endif ifneq (,$(filter sane, $(SYSTEM_STUFF))) BUILD_DEPS += , libsane-dev endif ifneq (,$(filter libpng, $(SYSTEM_STUFF))) BUILD_DEPS += , libpng-dev (>= 1.6) endif ifeq "$(ENABLE_CURL)" "y" ifneq (,$(filter curl, $(SYSTEM_STUFF))) BUILD_DEPS += , libcurl4-$(CURL_SECTYPE)-dev (>= 7.68) 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 COINMP_MINVER=(>= 1.7.6+dfsg1-2) COINUTILS_MINVER=(>= 2.10.14+repack1-1~) # go sure given #873362 COINMP_MINVER=(>= 1.8.3-3) ifneq ($(ENABLE_COINMP),y) CONFIGURE_FLAGS += --disable-coinmp else ifneq (,$(filter coinmp, $(SYSTEM_STUFF))) BUILD_DEPS += , 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 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:=debian/python3-uno/$(shell $(PYTHON) -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())') endif BUILD_DEPS += , $(PYTHON) ifeq "$(ENABLE_PYTHON)" "y" BUILD_DEPS += , $(PYTHON)-dev (>= 3.3) BUILD_DEPS += , $(PYTHON)-distutils 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) BUILD_DEPS += , dpkg-dev (>= 1.20.1) 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_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , fonts-liberation2$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , fonts-crosextra-carlito$(OOO_NO_CHECK_ARCHS) # https://lists.freedesktop.org/archives/libreoffice/2017-May/077764.html BUILD_DEPS_ARCH += , fonts-dejavu$(OOO_NO_CHECK_ARCHS) # used in vcl/qa/cppunit/text.cxx:void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs() BUILD_DEPS_ARCH += , fonts-kacst$(OOO_NO_CHECK_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. BUILD_DEPS_ARCH += , fonts-noto-core$(OOO_NO_CHECK_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_NO_CHECK_ARCHS) ifneq (,$(filter cppunit, $(SYSTEM_STUFF))) BUILD_DEPS_ARCH += , libcppunit-dev (>= 1.14)$(OOO_NO_CHECK_ARCHS) # 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_64BIT_ARCHS))] endif endif # 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) # we don't run any cppunit check in all builds ifneq "$(AUTOPKGTEST_BUILD)" "y" ifeq ($(MAKECMDGOALS),build-indep) CONFIGURE_FLAGS_INDEP += --without-cppunit endif endif else CONFIGURE_FLAGS += --without-cppunit endif ifeq "$(ENABLE_JUNIT4)" "y" BUILD_DEPS += , junit4 $(JUNIT_MIN_VER) [$(OOO_JUNIT_ARCHS)] else CONFIGURE_FLAGS += --without-junit endif ifeq "$(ENABLE_CHART_TESTS)" "y" CONFIGURE_FLAGS += --enable-chart-tests 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 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 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 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 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_HELP)" "y" ifeq "$(ENABLE_HTML_HELP)" "y" ifneq "$(BULLSEYE_BACKPORT)" "y" HELP_COMMON_DEPENDS += , node-prismjs BUILD_DEPS_INDEP += , node-prismjs endif endif endif ifeq "$(ENABLE_JAVA)" "y" BUILD_DEPS += , maven-repo-helper ifeq "$(JDK)" "default" JAVA_HOME=/usr/lib/jvm/default-java BUILD_DEPS += , java-common (>= 0.61) 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)/') 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 (>= 1.7.0)$(OOO_NO_JAVA_ARCHS) , ant-optional (>= 1.7.0)$(OOO_NO_JAVA_ARCHS) else # report-builder is done in build-arch already ifneq (,$(filter jfreereport, $(SYSTEM_STUFF))) BUILD_DEPS += , ant (>= 1.6.5)$(OOO_NO_JAVA_ARCHS) else BUILD_DEPS_INDEP += , ant (>= 1.6.5)$(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 (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libflute-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libpentaho-reporting-flow-engine-java (>= 0.9.4)$(OOO_NO_REPORTBUILDER_ARCHS) , liblayout-java (>= 0.2.10)$(OOO_NO_REPORTBUILDER_ARCHS) , libloader-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libformula-java (>= 1.1.7)$(OOO_NO_REPORTBUILDER_ARCHS) , librepository-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libfonts-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) , libserializer-java (>= 1.1.6)$(OOO_NO_REPORTBUILDER_ARCHS) REPORT_BUILDER_JAR_DEPENDS := , libbase-java, libsac-java, libxml-java (>= 1.1.6), libflute-java (>= 1.1.6), libpentaho-reporting-flow-engine-java (>= 0.9.4), liblayout-java (>= 0.2.10), libloader-java (>= 1.1.6), libformula-java (>= 1.1.7), librepository-java (>= 1.1.6), libfonts-java (>= 1.1.6), libserializer-java (>= 1.1.6) 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) else CONFIGURE_FLAGS += --without-java DEBHELPER_OPTIONS += -Nlibreoffice-officebean -Nlibofficebean-java -Nlibreoffice-java-common -Nlibreoffice-script-provider-bsh -Nlibreoffice-script-provider-js -Nlibreoffice-subsequentcheckbase -Nlibofficebean-java -Nlibunoloader-java -Nliblibreoffice-java -Nlibreoffice-sdbc-hsqldb 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 (>= 3.12.3) BUILD_DEPS+= , libnspr4-dev else CONFIGURE_FLAGS += --without-system-nss endif else CONFIGURE_FLAGS += --disable-nss endif ifeq "$(USE_UCPP)" "y" ifneq (,$(filter ucpp, $(SYSTEM_STUFF))) IDLC_CPP_DEPENDS := ucpp endif else IDLC_CPP_DEPENDS := cpp CONFIGURE_FLAGS += --with-idlc-cpp=cpp endif BUILD_DEPS += , $(IDLC_CPP_DEPENDS) ifneq (,$(filter hunspell, $(SYSTEM_STUFF))) BUILD_DEPS += , libhunspell-dev (>= 1.1.5-2) endif CONFIGURE_FLAGS += --with-external-dict-dir=$(DICT_DIR) ifneq (,$(filter altlinuxhyph, $(SYSTEM_STUFF))) BUILD_DEPS += , libhyphen-dev (>= 2.4) 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 (>= 1.1.3) 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.0), libmdds-dev (<< 2.1~) endif ifneq (,$(filter orcus, $(SYSTEM_STUFF))) BUILD_DEPS += , liborcus-dev (>= 0.17.2), liborcus-dev (<< 0.18~) endif ifeq "$(ENABLE_XMLHELP)" "y" ifneq (,$(filter clucene, $(SYSTEM_STUFF))) BUILD_DEPS += , libclucene-dev (>= 2.3.3.4-4.1) 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 (>= 2:1.2) endif ifneq (,$(filter libwps, $(SYSTEM_STUFF))) BUILD_DEPS += , libwps-dev (>= 0.4), libwps-dev (<< 0.5~) ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS_ARCH += , libwps-dev (>= 0.4.12)$(OOO_NO_CHECK_ARCHS) endif 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~) # ifeq "$(RUN_MAKE_CHECK)" "y" # BUILD_DEPS_ARCH += , libmwaw-dev (>= 0.3.21)$(OOO_NO_CHECK_ARCHS) BUILD_DEPS_ARCH += , libmwaw-dev (>= 0.3.21) # 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~) ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS_ARCH += , libetonyek-dev (>= 0.1.8)$(OOO_NO_CHECK_ARCHS) endif 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~) ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS_ARCH += , libstaroffice-dev (>= 0.0.3)$(OOO_NO_CHECK_ARCHS) endif 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~) ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS_ARCH += , libe-book-dev (>= 0.1.2)$(OOO_NO_CHECK_ARCHS) endif endif ifeq "$(ENABLE_LIBCMIS)" "y" ifneq (,$(filter libcmis, $(SYSTEM_STUFF))) BUILD_DEPS += , libcmis-dev (>= 0.5.2~), libcmis-dev (<< 0.6~) endif else CONFIGURE_FLAGS += --disable-libcmis endif ifeq "$(ENABLE_ZXING)" "y" ifneq (,$(filter zxing, $(SYSTEM_STUFF))) # https://cgit.freedesktop.org/libreoffice/core/commit/?id=d53340b2253537104abe6f95c8c63cc74487c3ec BUILD_DEPS += , libzxingcore-dev (>= 1.2.0) endif else CONFIGURE_FLAGS += --disable-zxing endif endif CONFIGURE_FLAGS += --with-external-thes-dir=$(THES_DIR) 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 += , libldap2-dev endif ifneq (,$(filter liblangtag, $(SYSTEM_STUFF))) BUILD_DEPS += , liblangtag-dev (>= 0.4) endif ifneq (,$(filter icu, $(SYSTEM_STUFF))) BUILD_DEPS += , libicu-dev (>= 52) 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 += , libkf5coreaddons-dev, libkf5i18n-dev, libkf5config-dev, libkf5windowsystem-dev, libkf5kio-dev endif PLASMA_ICONSET_DEP=libreoffice-style-breeze ifeq "$(ENABLE_QT5)" "y" CONFIGURE_FLAGS += --enable-qt5 BUILD_DEPS += , qtbase5-dev $(QT5_MINVER), qt5-qmake $(QT5_MINVER), qtbase5-dev-tools $(QT5_MINVER) BUILD_DEPS += , libqt5x11extras5-dev $(QT5_MINVER) BUILD_DEPS += , libglib2.0-dev (>= 2.4) BUILD_DEPS += , libxcb1-dev BUILD_DEPS += , libxcb-icccm4-dev endif ifeq "$(ENABLE_QT6)" "y" CONFIGURE_FLAGS += --enable-qt6 BUILD_DEPS += , qt6-base-dev $(QT6_MINVER), qmake6 $(QT6_MINVER), qt6-base-dev-tools $(QT6_MINVER) BUILD_DEPS += , libxcb1-dev endif ifeq "$(ENABLE_MARIADB)" "y" ifeq "$(MYSQL_FLAVOUR)" "default" BUILD_DEPS += , default-libmysqlclient-dev else ifeq "$(MYSQL_FLAVOUR)" "mysql" ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) BUILD_DEPS += , libmysqlclient-dev endif MARIADBCONFIG=/usr/bin/mysql_config endif ifeq "$(MYSQL_FLAVOUR)" "mariadb" ifneq (,$(filter mariadb, $(SYSTEM_STUFF))) BUILD_DEPS += , 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 += , libatomic-ops-dev (>= 7.3~alpha1+git20110913-1)$(OOO_NO_FIREBIRD_ARCHS) endif ifneq (,$(filter libtommath, $(SYSTEM_STUFF))) BUILD_DEPS += , libtommath-dev$(OOO_NO_FIREBIRD_ARCHS) endif ifneq (,$(filter firebird, $(SYSTEM_STUFF))) BUILD_DEPS += , firebird-dev (>= 3.0.0.32483.ds4-4)$(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 += , libgtk-3-dev (>= 3.20.0), libglib2.0-dev (>= 2.38.0) 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 += , gobject-introspection (>= 1.32.0), libgirepository1.0-dev (>= 1.32) CONFIGURE_FLAGS += --enable-introspection else DEBHELPER_OPTIONS+= -Ngir1.2-lokdocview-0.1 endif endif ifeq "$(BUILD_GTK4)" "y" BUILD_DEPS += , libgtk-4-dev, libglib2.0-dev (>= 2.38.0), 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 += , 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 += , libpq-dev (>= 9.0~) 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 CONFIGURE_FLAGS += --disable-python else PYUNO_DEPENDS = python3-uno (>= 4.4.0~beta2) 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= (>> 1.8.0.10) 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_INDEP += , libbsh-java endif CONFIGURE_FLAGS += --enable-scripting-beanshell else CONFIGURE_FLAGS += --disble-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 ifneq (,$(filter lpsolve, $(SYSTEM_STUFF))) ifeq "$(USE_SHARED_LPSOLVE)" "y" BUILD_DEPS += , 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 ifeq "$(USE_LIBSUITESPARSE)" "y" BUILD_DEPS += , libsuitesparse-dev $(SUITESPARSE_MIN_VERSION) else BUILD_DEPS += , libufsparse-dev endif endif ifeq "$(USE_DBUS)" "y" BUILD_DEPS += , libdbus-1-dev (>= 0.60) CONFIGURE_FLAGS += --enable-dbus ifeq "$(ENABLE_BLUETOOTH)" "y" BUILD_DEPS += , libglib2.0-dev (>= 2.4) 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 endif ifeq "$(ENABLE_AVAHI)" "y" BUILD_DEPS += , libavahi-client-dev CONFIGURE_FLAGS += --enable-avahi endif ifeq "$(USE_GSTREAMER)" "y" BUILD_DEPS += , libgstreamer1.0-dev CONFIGURE_FLAGS += --enable-gstreamer-1-0 BUILD_DEPS += , 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 (>= 7.68) 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 redland, $(SYSTEM_STUFF))) BUILD_DEPS += , librdf0-dev (>= 1.0.16-2) endif ifeq "$(ENABLE_GUI)" "y" ifneq (,$(filter epoxy, $(SYSTEM_STUFF))) BUILD_DEPS += , libepoxy-dev (>= 1.2) else BUILD_DEPS += , libegl1-mesa-dev endif endif ifneq (,$(filter glm, $(SYSTEM_STUFF))) BUILD_DEPS += , libglm-dev (>= 0.9.9~a2) endif ifneq (,$(filter gpgmepp, $(SYSTEM_STUFF))) BUILD_DEPS+= , libgpgmepp-dev (>= 1.14), 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 ifeq "$(ENABLE_GIO)" "y" ifneq "$(BUILD_GTK3)" "y" BUILD_DEPS += , libglib2.0-dev (>= 2.26.0) endif else CONFIGURE_FLAGS += --disable-gio endif ifeq "$(ENABLE_DCONF)" "y" BUILD_DEPS += , libdconf-dev (>= 0.15.2) 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 # 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=