#!/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-2015 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.0 OOVER:=7.0 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) 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') #FIXME SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(.\..\)\../\1/p' | cut -d" " -f1) ifeq "$(shell echo $(SYSTEM_GCC_VERSION) | cut -d. -f1)" "0" # gcc 10+ (0.0, 0.1, 0.2 etc.) SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(..\..\)\../\1/p' | cut -d" " -f1) endif 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-0-4 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],\ libfontconfig1-dev,\ libfreetype6-dev (>= 2.2.0),\ 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.66) ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) gt 10 && echo true)" "true" BOOST_MINVER= (>= 1.71) endif 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_QRCODEGEN=y SYSTEM_STUFF += qrcodegen 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 # 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 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_WEBDAV=y ifeq "$(ENABLE_WEBDAV)" "y" WEBDAV_LIB=neon ifeq "$(WEBDAV_LIB)" "neon" SYSTEM_STUFF += neon NEON_SECTYPE=gnutls NEONSONR=27 else SYSTEM_STUFF += apr SYSTEM_STUFF += serf endif 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) CURL_SECTYPE=gnutls 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 SYSTEM_STUFF += apache-commons 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 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 DEFAULT_IMAGE=colibre IMAGES:=$(DEFAULT_IMAGE) 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 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)" 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 SYSTEM_STUFF += libcmis SYSTEM_STUFF += jpeg SYSTEM_STUFF += libxml SYSTEM_STUFF += expat SYSTEM_STUFF += odbc SYSTEM_STUFF += curl 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 SYSTEM_STUFF += libpng SYSTEM_STUFF += nss ENABLE_HELP=y ifeq "$(ENABLE_HELP)" "y" ENABLE_HTML_HELP=y ifeq "$(ENABLE_HTML_HELP)" "y" HELP_DEPENDS := libreoffice-help-common (= $${binary:Version}), firefox-esr | epiphany-browser | konqueror | chromium | firefox HELP_COMMON_DEPENDS := libjs-normalize.css else HELP_DEPENDS := libreoffice-writer DEBHELPER_OPTIONS += -Nlibreoffice-help-common endif SYSTEM_STUFF += clucene endif SYSTEM_STUFF += lcms2 # this violates the requirement that nowindows should not change the # package contents (-dev-common here) but a extra package for this # is too much overhead (especially since this .dll will be gone # in LO 7.2 anyway.) ifeq ($(filter nowindows,$(DEB_BUILD_PROFILES)),) PACKAGE_UNOWINREG_DLL=y ifeq "$(DEB_VENDOR)" "Debian" BUILD_UNOWINREG_DLL=y endif endif SYSTEM_STUFF += liblangtag SYSTEM_STUFF += orcus USE_UCPP=y ifeq "$(USE_UCPP)" "y" SYSTEM_STUFF += ucpp 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 CHECK_APPARMOR_PROFILES=true ENABLE_LIBNUMBERTEXT=y SYSTEM_STUFF += libnumbertext # Default flags to pass to configure CONFIGURE_FLAGS+= \ --with-vendor='$(OOO_VENDOR)' \ --with-extra-buildid='$(DEB_VENDOR) package version: $(DEB_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 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) 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,$(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 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=- ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),$(OOO_CHECK_FATAL_ARCHS))) IGNORE_MAKE_CHECK_FAILURES:= endif endif # Java... ifeq "$(JDK)" "default" OOO_JAVA_ARCHS = $(filter $(OOO_ARCHS),$(java6_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 := amd64 i386 arm64 armhf s390x ppc64 ppc64el $(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 else CONFIGURE_FLAGS += --enable-extension-integration 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 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 # transitional package.. DEBHELPER_OPTIONS += -Nlibreoffice-kde5 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 ############# # Distro-specific overrides # Debian Buster ifeq "$(DEB_DISTRIBUTION)" "buster-backports" BUGS=mailto:debian-backports@lists.debian.org SYSTEM_STUFF := $(filter-out libmwaw xmlsec mdds orcus libnumbertext,$(SYSTEM_STUFF)) USE_DWZ := n BUSTER_BACKPORT=y 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 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 "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) gt 10 && echo true)" "true" 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 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 (armel,$(findstring armel,$(DEB_HOST_ARCH))) # there is no clang 11 on buster, obviously and this also fails to build with gcc 7 in buster ifeq "$(BUSTER_BACKPORT)" "y" ENABLE_SKIA=n endif endif ifeq "$(ENABLE_SKIA)" "y" ifeq "$(ALLOW_CLANG)" "y" ifeq (ccache,$(findstring ccache,$(DEB_BUILD_OPTIONS))) export CCACHE_CPP2=1 endif ifeq "$(CLANG_VERSION)" "default" BUILD_DEPS += , clang (>= 1:5.0.2) [$(filter-out armel,$(OOO_LE_ARCHS))] ifneq "$(BUSTER_BACKPORT)" "y" # see #963162, #963167 which apparently don't exist on 11 BUILD_DEPS += , clang (>= 1:11) [armel] endif else export CLANG_CC=clang-$(CLANG_VERSION) export 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:5.0.2) 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 += , libclang-dev, llvm-dev else BUILD_DEPS += , libclang-$(CLANG_VERSION)-dev, llvm-$(CLANG_VERSION)-dev endif endif endif USE_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 ifneq "$(PACKAGE_SDK)" "y" CONFIGURE_FLAGS += --disable-odk ifneq "$(PACKAGE_SDK_DOCS)" "y" CONFIGURE_FLAGS += --without-doxygen --without-javadoc endif else 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.12.0), libpoppler-private-dev, libpoppler-cpp-dev else CONFIGURE_FLAGS += --disable-poppler endif ifeq "$(ENABLE_PDFIUM)" "n" CONFIGURE_FLAGS += --disable-pdfium endif endif ifneq (,$(filter graphite, $(SYSTEM_STUFF))) BUILD_DEPS += , libgraphite2-dev (>= 0.9.3) endif ifneq (,$(filter harfbuzz, $(SYSTEM_STUFF))) BUILD_DEPS += , libharfbuzz-dev (>= 0.9.42) 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 ifeq "$(ENABLE_LIBNUMBERTEXT)" "y" ifneq (,$(filter libnumbertext, $(SYSTEM_STUFF))) BUILD_DEPS += , libnumbertext-dev (>= 1.0.6) NUMBERTEXT_DATA_RECOMMENDS := libnumbertext-data endif else CONFIGURE_FLAGS += --disable-libnumbertext 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 endif ifneq (,$(filter curl, $(SYSTEM_STUFF))) BUILD_DEPS += , libcurl4-$(CURL_SECTYPE)-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))) SMALL_SYMBOLS = n 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 += , $(PYTHON)-lxml else CONFIGURE_FLAGS += --without-lxml endif endif endif BUILD_DEPS += , debhelper-compat (= 12) ifeq "$(BUILD_DBGSYM_PACKAGES)" "y" # from debhelper changelog BUILD_DEPS += , dpkg-dev (>= 1.18.2~) else BUILD_DEPS += , dpkg-dev (>= 1.17.14) endif ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS += , locales$(OOO_NO_CHECK_ARCHS) BUILD_DEPS += , gdb$(OOO_NO_CHECK_ARCHS) BUILD_DEPS += , fontconfig$(OOO_NO_CHECK_ARCHS) BUILD_DEPS += , fonts-liberation2$(OOO_NO_CHECK_ARCHS) BUILD_DEPS += , fonts-crosextra-carlito$(OOO_NO_CHECK_ARCHS) # https://lists.freedesktop.org/archives/libreoffice/2017-May/077764.html BUILD_DEPS += , fonts-dejavu$(OOO_NO_CHECK_ARCHS) ifneq (,$(filter cppunit, $(SYSTEM_STUFF))) BUILD_DEPS += , libcppunit-dev (>= 1.14)$(OOO_NO_CHECK_ARCHS) 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 += , pstoedit$(OOO_NO_CHECK_ARCHS) BUILD_DEPS += , imagemagick$(OOO_NO_CHECK_ARCHS) BUILD_DEPS += , ghostscript$(OOO_NO_CHECK_ARCHS) BUILD_DEPS += , hunspell-en-us$(OOO_NO_CHECK_ARCHS) BUILD_DEPS += , hyphen-en-us$(OOO_NO_CHECK_ARCHS) 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_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 # but upstream also says --target=1.8 so 1.8 is fine in runtime JAVA_RUNTIME_DEPENDS = default-jre (>= 2:1.8) JAVA_RUNTIME_DEPENDS += | java8-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 "$(PACKAGE_SDK)" "y" ifeq "$(PACKAGE_UNOWINREG_DLL)" "y" ifeq "$(BUILD_UNOWINREG_DLL)" "y" CONFIGURE_FLAGS_INDEP += --enable-build-unowinreg BUILD_DEPS_INDEP += , g++-mingw-w64-i686 WIN_TRIPLET := i686-w64-mingw32 CONFIGURE_FLAGS_INDEP += --with-mingw-cross-compiler=$(WIN_TRIPLET)-g++ endif endif endif 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 ifneq (,$(filter apache-commons, $(SYSTEM_STUFF))) REPORT_BUILDER_BUILD_DEPS += , libcommons-logging-java$(OOO_NO_JAVA_ARCHS) REPORT_BUILDER_JAR_DEPENDS += , libcommons-logging-java CONFIGURE_FLAGS += --with-commons-logging-jar=/usr/share/java/commons-logging.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 -Nlibunoil-java -Nlibofficebean-java -Nlibjuh-java -Nlibridl-java -Nlibunoloader-java -Nlibjurt-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 ifneq (,$(filter nss, $(SYSTEM_STUFF))) BUILD_DEPS+= , libnss3-dev (>= 3.12.3) BUILD_DEPS+= , libnspr4-dev endif ifeq "$(USE_UCPP)" "y" ifneq (,$(filter ucpp, $(SYSTEM_STUFF))) IDLC_CPP_DEPENDS := ucpp endif else # hardcode 4.7 as 4.8 fails: # 14:17 <@caolan> ah, "build fails with cpp 4.8.0, this is fixable by passing # -P, but then idlc produces empty urd files" IDLC_CPP_DEPENDS := cpp-4.7 CONFIGURE_FLAGS += --with-idlc-cpp=cpp-4.7 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 endif ifneq "$(ENABLE_SKIA)" "y" CONFIGURE_FLAGS += --disable-skia endif ifneq (,$(filter mdds, $(SYSTEM_STUFF))) BUILD_DEPS += , libmdds-dev (>= 1.5), libmdds-dev (<< 1.8~) endif ifneq (,$(filter orcus, $(SYSTEM_STUFF))) BUILD_DEPS += , liborcus-dev (>= 0.16), liborcus-dev (<< 0.17~) endif ifneq (,$(filter clucene, $(SYSTEM_STUFF))) BUILD_DEPS += , libclucene-dev (>= 2.3.3.4-4.1) 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 += , libwps-dev (>= 0.4.9) 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 += , libmwaw-dev (>= 0.3.15) 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 += , libetonyek-dev (>= 0.1.8) 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 += , libstaroffice-dev (>= 0.0.3) 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 += , libe-book-dev (>= 0.1.2) endif endif ifneq (,$(filter libcmis, $(SYSTEM_STUFF))) BUILD_DEPS += , libcmis-dev (>= 0.5.2~), libcmis-dev (<< 0.6~) endif ifeq "$(ENABLE_QRCODEGEN)" "y" ifneq (,$(filter qrcodegen, $(SYSTEM_STUFF))) BUILD_DEPS += , libqrcodegencpp-dev endif else CONFIGURE_FLAGS += --disable-qrcodegen endif endif CONFIGURE_FLAGS += --with-external-thes-dir=$(THES_DIR) ifeq "$(INSTALL_APPARMOR_PROFILES)" "y" BUILD_DEPS += , dh-apparmor ifeq "$(CHECK_APPARMOR_PROFILES)" "true" BUILD_DEPS += , 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 ifeq "$(BUSTER_BACKPORT)" "y" # for correct qmake/moc BUILD_DEPS += , qtchooser export QT_SELECT=5 endif endif 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 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 += , 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.18.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 "$(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 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" ifeq "$(WEBDAV_LIB)" "neon" ifneq (,$(filter neon, $(SYSTEM_STUFF))) ifneq "$(NEON_SECTYPE)" "openssl" BUILD_DEPS += , libneon$(NEONSONR)-$(NEON_SECTYPE)-dev else BUILD_DEPS += , libneon$(NEONSONR)-dev endif endif else ifneq (,$(filter apr, $(SYSTEM_STUFF))) BUILD_DEPS += , libaprutil1-dev endif ifneq (,$(filter serf, $(SYSTEM_STUFF))) BUILD_DEPS += , libserf-dev endif endif CONFIGURE_FLAGS += --with-webdav=$(WEBDAV_LIB) else CONFIGURE_FLAGS += --with-webdav=no endif ifeq "$(ENABLE_HELP)" "n" CONFIGURE_FLAGS += --without-helppack-integration --without-help 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, libgpgme-dev, libgpg-error-dev endif ifeq "$(RUN_MAKE_CHECK)" "y" BUILD_DEPS+= , gpg BUILD_DEPS+= , gpgconf BUILD_DEPS+= , gpg-agent 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 endif ifeq ($(USE_GOLD),y) CONFIGURE_FLAGS += --enable-ld=gold else # --enable-ld=gold is default for debug builds if found ifneq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS))) CONFIGURE_FLAGS += --disable-ld 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=