PageRenderTime 286ms CodeModel.GetById 176ms RepoModel.GetById 1ms app.codeStats 3ms

/rules

https://bitbucket.org/markjenkins/libreoffice_ubuntu-debian-fixes_againt_packaging
Makefile | 3133 lines | 2515 code | 293 blank | 325 comment | 166 complexity | 9115ea07ade6e5734c2c80f94d52e9be MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception

Large files files are truncated, but you can click here to view the full file

  1. #!/usr/bin/make -f
  2. ################################################################################
  3. # LibreOffice source package rules file
  4. #
  5. # Please see debian/README for detailed documentation about the build system, and
  6. # how to build LibreOffice.
  7. ################################################################################
  8. # Authors:
  9. # Chris Halls <halls@debian.org>
  10. # Rene Engelhard <rene@debian.org>
  11. # Copyright 2002-2011 Software in the Public Interest, Inc.
  12. # Portions Copyright 2010 Canonical Ltd. Author: Matthias Klose
  13. # Licensed under the GNU General Public License, version 2. See the file
  14. # /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
  15. ################################################################################
  16. vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1)))
  17. include /usr/share/dpkg/pkg-info.mk
  18. CURDIR ?= $(realpath $(dir $(firstword $(MAKEFILE_LIST)))/..)
  19. BASE_VERSION:=$(shell echo $(DEB_VERSION) | cut -d: -f1):$(DEB_VERSION_UPSTREAM)
  20. BINARY_VERSION=$(DEB_VERSION)
  21. #HELP_L10N_VIRTUAL_VERSION:=$(shell echo $(DEB_VERSION_UPSTREAM) | cut -d: -f2 | tr [~] [\\-])
  22. HELP_L10N_VIRTUAL_VERSION:=3.5
  23. #VER:=3
  24. OOVER:=3.5
  25. NEXT_OOVER:=$(shell echo "$(OOVER) + 0.1" | bc)
  26. ARCH_INDEP_PACKAGES := $(shell dh_listpackages -i)
  27. ARCH_DEP_PACKAGES := $(shell dh_listpackages -s)
  28. PACKAGES := $(ARCH_INDEP_PACKAGES) $(ARCH_DEP_PACKAGES)
  29. include /usr/share/dpkg/architecture.mk
  30. include /usr/share/dpkg/vendor.mk
  31. DISTREL := $(shell lsb_release -cs)
  32. SHELL:=/bin/bash
  33. SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(.\..\)\..$$/\1/p')
  34. # Debian buildds run as user `buildd', other are using /CurrentlyBuilding
  35. ON_BUILDD := $(shell if [ "`whoami`" = buildd -o -f /CurrentlyBuilding ] || echo $(CURDIR) | grep -q \/build\/buildd; then echo y; else echo n; fi)
  36. PKGDIR:=debian/libreoffice$(VER)
  37. OODIRNAME=libreoffice$(VER)
  38. OODIR:=usr/lib/$(OODIRNAME)
  39. OOUREDIR:=usr/lib/ure
  40. OOSDKDIR:=$(OODIR)/sdk
  41. # Figure out who's building this package.
  42. OOO_VENDOR:=The Document Foundation/Debian
  43. ifeq "$(DEB_VENDOR)" "Ubuntu"
  44. OOO_VENDOR=The Document Foundation, Debian and Ubuntu
  45. endif
  46. export OOO_VENDOR
  47. # debhelper
  48. export DH_OPTIONS
  49. export DH_ALWAYS_EXCLUDE=CVS:.svn:.bzr:.git
  50. #export DH_VERBOSE=1
  51. # quilt
  52. export QUILT_PATCHES=debian/patches
  53. export QUILT_OPTIONS="-p1 -F0"
  54. SOURCE_TREE=.
  55. STAMP_DIR=debian/stampdir
  56. TARFILE_LOCATION=$(CURDIR)/src
  57. export TARFILE_LOCATION
  58. USE_SOURCE_TARBALLS=y
  59. USE_GIT_TARBALLS=n
  60. ifeq "$(USE_GIT_TARBALLS)" "y"
  61. GIT_BASEURL:=git://anongit.freedesktop.org/libreoffice
  62. lo_sources_ver=3.5.4.2
  63. # NOT in proper libreoffice-3-5 branch
  64. # use ./g checkout -b tag-libreoffice-3.5.4.2 libreoffice-3.5.4.2
  65. GIT_TAG=libreoffice-$(lo_sources_ver)
  66. GIT_BRANCH=tag-libreoffice-$(lo_sources_ver)
  67. endif
  68. ifeq "$(USE_SOURCE_TARBALLS)" "y"
  69. lo_sources_ver=$(shell cat $(CURDIR)/sources.ver | cut -d= -f2)
  70. endif
  71. ifeq "$(DISTREL)" "squeeze"
  72. SQUEEZE_BACKPORT=y
  73. endif
  74. #########
  75. # Default package configuration
  76. #
  77. OOO_ARCHS = alpha amd64 armel armhf hppa i386 ia64 mips mipsel powerpc powerpcspe ppc64 s390 s390x sparc kfreebsd-amd64 kfreebsd-i386
  78. PATCHSET=$(DEB_VENDOR)
  79. BUILD_DEPS=
  80. # These are components which can be built from internal copies, or used from the
  81. # distribution. See configure --help for valid values (--with-system-<value>).
  82. SYSTEM_STUFF = dicts
  83. BUILD_PYUNO=y
  84. ENABLE_PYTHON3=y
  85. ifeq "$(BUILD_PYUNO)" "y"
  86. ENABLE_SCRIPT_PROVIDER_PYTHON=y
  87. endif
  88. # THIS IS ONLY FOR TESTING. When building against a specified pythonX.Y
  89. # this will work inside OOo but *not* from outside OOo unless the user
  90. # uses pythonX.Y directly (and the dh_pycentral-created dependencies allow
  91. # also the non-working default python then) - see e.g. #587402. Also
  92. # note we are NOT working with python < 2.6 anymore!
  93. PYTHON_VERSION=current
  94. ifeq "$(PYTHON_VERSION)" "current"
  95. PYTHON=python (>= 2.6)
  96. export PYTHON=python
  97. else
  98. PYTHON=python$(PYTHON_VERSION)
  99. export PYTHON=python$(PYTHON_VERSION)
  100. endif
  101. ifeq "$(ENABLE_PYTHON3)" "y"
  102. PYTHON3_VERSION=current
  103. ifeq "$(PYTHON3_VERSION)" "current"
  104. PYTHON3=python3
  105. else
  106. PYTHON3=python$(PYTHON3_VERSION)
  107. endif
  108. endif
  109. PACKAGE_TTF_OPENSYMBOL=y
  110. BUILD_BINFILTERS=y
  111. BUILD_ONLY_EN_US=n
  112. ENABLE_JAVA=y
  113. ifeq "$(ENABLE_JAVA)" "y"
  114. JDK=openjdk
  115. JAVA_MAINVER=6
  116. ifneq (,$(filter hppa kfreebsd%, $(DEB_HOST_ARCH)))
  117. JDK=gcj-jdk
  118. endif
  119. endif
  120. JAVAHELPER_MIN_VERSION= (>= 0.37~)
  121. SYSTEM_STUFF += hunspell
  122. HUNSPELL_MIN_VER= (>= 1.1.5-2)
  123. SYSTEM_STUFF += altlinuxhyph
  124. USE_LIBHYPHEN=y
  125. LIBALTLINUXHYPH_MINVER= (>= 0.1.1-11)
  126. LIBHYPHEN_MINVER= (>= 2.4)
  127. SYSTEM_STUFF += boost
  128. BOOST_VERSION=default
  129. ifeq "$(BOOST_VERSION)" "default"
  130. BOOST_MINVER= (>= 1.38)
  131. endif
  132. ifeq "$(BOOST_VERSION)" "1.39"
  133. BOOST_MINVER= (>= 1.39.0-2)
  134. endif
  135. SYSTEM_STUFF += mdds
  136. SYSTEM_STUFF += vigra
  137. USE_EXTERNAL_CXXLIBS=y
  138. #SYSTEM_STUFF += sablot
  139. SYSTEM_STUFF += mythes
  140. SYSTEM_STUFF += icu
  141. ICU_MINVER= (>= 4.0)
  142. SYSTEM_STUFF += libwpd libwpg libwps
  143. SYSTEM_STUFF += libvisio
  144. #SYSTEM_STUFF += xmlsec
  145. BUILD_CAIROCANVAS=y
  146. SYSTEM_STUFF += cairo
  147. CAIRO_FONTS_PATCH=y
  148. BUILD_KDE=y
  149. # not ported to KDE 4
  150. ENABLE_KDEAB=n
  151. ifeq "$(SYSTEM_GCC_VERSION)" "4.7"
  152. # < 4.8 fails with gcc 4.7, see #667911
  153. QT_MINVER= (>= 4:4.8)
  154. else
  155. QT_MINVER= (>= 4:4.5)
  156. endif
  157. KDELIBS_MINVER= (>= 4:4.3.4)
  158. BUILD_DBG_PACKAGE=y
  159. ifeq "$(BUILD_DBG_PACKAGE)" "y"
  160. ENABLE_SYMBOLS=y
  161. SMALL_SYMBOLS=y
  162. endif
  163. ifeq "$(ENABLE_JAVA)" "y"
  164. # NOTE: If you change this while gcj/ant multiarch combo is still broken
  165. # you need to disable bsh scripting engine completely (see disable-rhino.diff)
  166. # See http://lists.debian.org/debian-java/2011/06/msg00108.html and replies
  167. SYSTEM_STUFF += beanshell
  168. SYSTEM_STUFF += hsqldb
  169. HSQLDB_MINVER= (>> 1.8.0.10)
  170. HSQLDB_TOONEWVER=1.8.1
  171. # disabled because system-saxon breaks all kinds exports using XSLT transforms
  172. # (e.g. M$ Word/Excel 2003 XML, Mediawiki, XHTML, UOF, ...)
  173. # It does *NOT* fail with _plain_ saxon 9.0.0.8 built with OOos build.xml
  174. # for UOF, but still for e.g. M$.
  175. #SYSTEM_STUFF += saxon
  176. SYSTEM_STUFF += lucene
  177. endif
  178. SYSTEM_STUFF += lpsolve
  179. USE_SHARED_LPSOLVE=y
  180. LPSOLVE_MIN_VERSION= (>= 5.5.0.13-5+b1)
  181. USE_DBUS=y
  182. USE_GSTREAMER=y
  183. SYSTEM_STUFF += neon
  184. NEON_SECTYPE=gnutls
  185. NEONSONR=27
  186. SYSTEM_STUFF += redland
  187. PACKAGE_SDK=y
  188. ifeq "$(ENABLE_JAVA)" "y"
  189. ifeq "$(JDK)" "openjdk"
  190. RUN_MAKE_CHECK=y
  191. ENABLE_JUNIT4=y
  192. endif
  193. else
  194. RUN_MAKE_CHECK=n
  195. ENABLE_JUNIT4=n
  196. endif
  197. ifeq "$(ENABLE_JUNIT4)" "y"
  198. JUNIT_MIN_VER= (>= 4.8.2-2)
  199. endif
  200. USE_LIBCURL4=y
  201. CURL_SECTYPE=gnutls
  202. USE_SYSTEM_DMAKE=y
  203. USE_LIBSUITESPARSE=y
  204. SUITESPARSE_MIN_VERSION= (>= 1:3.4.0)
  205. PARALLEL_BUILD=y
  206. ENABLE_LDAP=y
  207. USE_OPENLDAP=y
  208. ENABLE_OPENGL=y
  209. SYSTEM_STUFF += openssl
  210. NEW_DPKG_SHLIBDEPS=y
  211. ifeq "$(ENABLE_JAVA)" "y"
  212. ENABLE_REPORTDESIGN=y
  213. SYSTEM_STUFF += jfreereport
  214. ENABLE_MEDIAWIKI=y
  215. SYSTEM_STUFF += apache-commons
  216. ENABLE_SCRIPT_PROVIDER_BSH=y
  217. ENABLE_SCRIPT_PROVIDER_JS=y
  218. else
  219. ENABLE_REPORTDESIGN=n
  220. ENABLE_MEDIAWIKI=n
  221. ENABLE_SCRIPT_PROVIDER_BSH=n
  222. ENABLE_SCRIPT_PROVIDER_JS=n
  223. endif
  224. ENABLE_SDBC_POSTGRESQL=y
  225. ENABLE_MINIMIZER=y
  226. ENABLE_PRESENTER_CONSOLE=y
  227. ENABLE_PDFIMPORT=y
  228. BUILD_GTK=y
  229. #ifeq "$(DEB_DISTRIBUTION)" "experimental"
  230. BUILD_GTK3=y
  231. #endif
  232. ENABLE_EVO2=y
  233. ENABLE_GVFS=n
  234. ENABLE_GCONF=y
  235. ENABLE_GIO=y
  236. ENABLE_RANDR=y
  237. ifeq "$(BUILD_GTK)" "y"
  238. PACKAGE_NSPLUGIN=n
  239. ifeq "$(PACKAGE_NSPLUGIN)" "y"
  240. SYSTEM_STUFF += mozilla-headers
  241. endif
  242. endif
  243. PACKAGE_BASE=y
  244. ENABLE_GRAPHITE=y
  245. SYSTEM_STUFF += graphite
  246. ALLOC=system
  247. SYSTEM_STUFF += libexttextcat
  248. SYSTEM_STUFF += cppunit
  249. ENABLE_LIBRSVG=y
  250. SYSTEM_LIBRSVG=y
  251. # when we have a package we want to have to be installed on older things with some older
  252. # C++ ABI (like it was the case with libreoffice2), we need to set this. Don't touch
  253. # otherwise
  254. SYSTEM_STUFF += stdlibs
  255. DEFAULT_IMAGE=galaxy
  256. IMAGES:=$(DEFAULT_IMAGE) crystal hicontrast tango oxygen
  257. ENABLE_MYSQLNATIVE=y
  258. # cannot be disabled, unless you have a internal MySQL/PostgreSQL somewhere :-)
  259. SYSTEM_STUFF += mysql mysql-cppconn
  260. MYSQLCPPCONN_MINVER= (>= 1.1.0~r791)
  261. SYSTEM_STUFF += postgresql
  262. DICT_DIR=/usr/share/hunspell
  263. HYPH_DIR=/usr/share/hyphen
  264. THES_DIR=/usr/share/mythes
  265. SYSTEM_STUFF += libcmis
  266. SYSTEM_STUFF += jpeg
  267. SYSTEM_STUFF += libxml
  268. SYSTEM_STUFF += expat
  269. SYSTEM_STUFF += odbc
  270. SYSTEM_STUFF += curl
  271. SYSTEM_STUFF += sane
  272. SYSTEM_STUFF += xextensions-headers
  273. SYSTEM_STUFF += mesa-headers
  274. SYSTEM_STUFF += db
  275. SYSTEM_STUFF += poppler
  276. SYSTEM_STUFF += libpng
  277. SYSTEM_STUFF += nss
  278. SYSTEM_STUFF += sampleicc
  279. PACKAGE_UNOWINREG_DLL=y
  280. ifeq "$(DEB_VENDOR)" "Debian"
  281. BUILD_UNOWINREG_DLL=y
  282. endif
  283. # Default flags to pass to configure
  284. CONFIGURE_FLAGS= \
  285. --with-vendor='$(OOO_VENDOR)' \
  286. --with-install-dirname=$(OODIRNAME) \
  287. --prefix=/usr --mandir=/usr/share/man \
  288. --docdir=/usr/share/doc/libreoffice \
  289. --disable-strip-solver \
  290. --enable-lockdown \
  291. --libdir=/usr/lib \
  292. --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
  293. --enable-extension-integration \
  294. --disable-online-update \
  295. --disable-fetch-external \
  296. --enable-release-build \
  297. --without-fonts \
  298. --without-myspell-dicts
  299. ifneq ($(ON_BUILDD),y)
  300. CONFIGURE_FLAGS += --enable-verbose
  301. endif
  302. CONFIGURE_FLAGS += --with-alloc=$(ALLOC)
  303. #############
  304. # Architecture-specific changes
  305. # helper to generate no_archs macros (pass name of source macro)
  306. define gen_no_archs
  307. _no_arch_macro = $(subst OOO_,OOO_NO_,$1)
  308. _no_arch_tmp_$1 = $$(foreach _a,$$(filter-out $$(call $1),$(OOO_ARCHS)),!$$(_a))
  309. $$(_no_arch_macro) = $$(if $$(_no_arch_tmp_$1),$$(_empty) [$$(_no_arch_tmp_$1)])
  310. endef
  311. PLATFORMID := $(shell grep PLATFORMID debian/vars.$(DEB_HOST_ARCH) | cut -d"=" -f2)
  312. # ./configure defaults to STLport on i386 and we should keep it for
  313. # ABI-compatability
  314. OOO_STLPORT_ARCHS= i386
  315. ifeq "$(DEB_HOST_ARCH)" "i386"
  316. LINK_TO_STLPORT=y
  317. endif
  318. ifneq (,$(findstring mips,$(OOO_ARCHS)))
  319. BUILD_DEPS += , gcc-4.4 [mips mipsel], g++-4.4 [mips mipsel]
  320. ifneq (,$(findstring mips,$(DEB_HOST_ARCH)))
  321. GCC_VERSION := 4.4
  322. endif
  323. endif
  324. ifeq "$(ENABLE_OPENGL)" "y"
  325. # doesn't make that much sense on armel and mips(el), does it? :)
  326. OOO_OGLTRANS_ARCHS = $(filter-out armel mips%, $(OOO_ARCHS))
  327. ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_OGLTRANS_ARCHS)))
  328. ENABLE_OPENGL=n
  329. endif
  330. $(eval $(call gen_no_archs,OOO_OGLTRANS_ARCHS))
  331. endif
  332. ifneq (,$(findstring arm,$(DEB_HOST_ARCH)))
  333. ifneq (stdlibs,$(findstring stdlibs,$(SYSTEM_STUFF)))
  334. $(error sal does not build on arm with internal stdlibs!)
  335. endif
  336. endif
  337. OOO_64BIT_ARCHS = $(filter alpha amd64 ia64 kfreebsd-amd64 ppc64 s390x, $(OOO_ARCHS))
  338. # Java...
  339. OOO_JAVA_ARCHS = $(OOO_ARCHS)
  340. $(eval $(call gen_no_archs,OOO_JAVA_ARCHS))
  341. OOO_GCJ_ARCHS = $(filter-out $(OOO_OPENJDK_ARCHS), $(OOO_JAVA_ARCHS))
  342. $(eval $(call gen_no_archs,OOO_GCJ_ARCHS))
  343. OOO_GCJ_JDK_ARCHS := hppa kfreebsd-i386 kfreebsd-amd64
  344. OOO_OPENJDK_ARCHS := $(filter-out $(OOO_GCJ_JDK_ARCHS),$(OOO_JAVA_ARCHS))
  345. $(eval $(call gen_no_archs,OOO_OPENJDK_ARCHS))
  346. OOO_UNOWINREG_DLL_ARCHS := i386 amd64
  347. ifneq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),$(OOO_UNOWINREG_DLL_ARCHS)))
  348. PACKAGE_UNOWINREG_DLL=n
  349. endif
  350. OOO_ARCH_DEP_EXTENSIONS_ARCHS := $(OOO_ARCHS)
  351. OOO_EXTENSIONS_ARCHS := $(OOO_ARCH_DEP_EXTENSIONS_ARCHS)
  352. OOO_BASE_ARCHS := $(OOO_JAVA_ARCHS)
  353. $(eval $(call gen_no_archs,OOO_BASE_ARCHS))
  354. OOO_REPORTDESIGN_ARCHS := $(filter-out $(OOO_GCJ_JDK_ARCHS),$(OOO_JAVA_ARCHS))
  355. $(eval $(call gen_no_archs,OOO_REPORTDESIGN_ARCHS))
  356. ifneq (,$(findstring $(DEB_HOST_ARCH),$(OOO_NO_BASE_ARCHS)))
  357. ifneq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),$(OOO_BASE_ARCHS)))
  358. PACKAGE_BASE=n
  359. ENABLE_SDBC_POSTGRESQL=n
  360. ENABLE_MYSQLNATIVE=n
  361. ENABLE_EVO2=n
  362. ENABLE_KDEAB=n
  363. ENABLE_REPORTDESIGN=n
  364. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-base libreoffice$(VER)-base-core
  365. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-evolution -Nlibreoffice$(VER)-kab
  366. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-sdbc-postgresql -Nlibreoffice$(VER)-mysql-connector
  367. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-report-builder-bin -Nlibreoffice$(VER)-report-builder
  368. endif
  369. endif
  370. ifeq (,$(findstring $(DEB_HOST_ARCH),$(OOO_ARCH_DEP_EXTENSIONS_ARCHS)))
  371. ENABLE_MINIMIZER=n
  372. ENABLE_PDFIMPORT=n
  373. ENABLE_PRESENTER_CONSOLE=n
  374. ENABLE_MYSQLNATIVE=n
  375. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-mysql-connector
  376. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-report-builder-bin -Nlibreoffice$(VER)-report-builder
  377. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-pdfimport -Nlibreoffice$(VER)-presentation-minimizer
  378. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-presenter-console
  379. endif
  380. ifeq (,$(findstring $(DEB_HOST_ARCH),$(OOO_EXTENSIONS_ARCHS)))
  381. ENABLE_MEDIAWIKI=n
  382. ENABLE_REPORTDESIGN=n
  383. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-report-builder-bin -Nlibreoffice$(VER)-report-builder
  384. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-wiki-publisher -Nlibreoffice$(VER)-script-provider-python
  385. endif
  386. ifeq (,$(filter $(DEB_HOST_ARCH),$(OOO_JAVA_ARCHS)))
  387. ENABLE_JAVA=n
  388. ENABLE_REPORTDESIGN=n
  389. ENABLE_MEDIAWIKI=n
  390. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-wiki-publisher
  391. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-report-builder-bin -Nlibreoffice$(VER)-report-builder
  392. endif
  393. ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),$(OOO_GCJ_JDK_ARCHS)))
  394. ifneq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH),$(OOO_OPENJDK_ARCHS)))
  395. ENABLE_REPORTDESIGN=n
  396. SYSTEM_STUFF := $(filter-out jfreereport, $(SYSTEM_STUFF))
  397. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-report-builder-bin -Nlibreoffice$(VER)-report-builder
  398. endif
  399. endif
  400. # disable SRB on ia64 when building with internal jfreereport.
  401. # fails to build. ("The system is out of resources."). FIXME.
  402. ifeq (ia64,$(findstring ia64,$(OOO_OPENJDK_ARCHS)))
  403. ifeq (,$(findstring jfreereport,$(SYSTEM_STUFF)))
  404. OOO_REPORTDESIGN_ARCHS := $(filter-out ia64,$(OOO_REPORTDESIGN_ARCHS))
  405. ifeq "$(DEB_HOST_ARCH)" "ia64"
  406. ENABLE_REPORTDESIGN=n
  407. endif
  408. endif
  409. endif
  410. ifneq (,$(filter $(DEB_HOST_ARCH),$(OOO_GCJ_ARCHS)))
  411. BUILD_JARS_NATIVE=y
  412. endif
  413. ifeq "$(PACKAGE_NSPLUGIN)" "y"
  414. OOO_NSPLUGIN_ARCHS = $(OOO_ARCHS)
  415. else
  416. OOO_NSPLUGIN_ARCHS=
  417. endif
  418. $(eval $(call gen_no_archs,OOO_NSPLUGIN_ARCHS))
  419. # builds long and is for legacy filters. probably not needed on {arm,mips}{,el}
  420. ifneq (,$(filter arm% mips% m68k, $(DEB_HOST_ARCH)))
  421. BUILD_BINFILTERS=n
  422. endif
  423. OOO_BINFILTER_ARCHS:=$(filter-out arm% mips% m68k, $(OOO_ARCHS))
  424. #############
  425. # Distro-specific overrides
  426. # Debian
  427. ifeq "$(DEB_VENDOR)" "Debian"
  428. # we don't need to build all languages and the thesaurus on the buildds;
  429. # they do binary-only builds anyway
  430. ifeq ($(ON_BUILDD),y)
  431. BUILD_ONLY_EN_US=y
  432. endif
  433. CONFIGURE_FLAGS += --with-intro-progressbar-color=215,7,81
  434. endif
  435. # Debian Squeeze
  436. ifeq "$(SQUEEZE_BACKPORT)" "y"
  437. BUGS=mailto:debian-backports@lists.debian.org
  438. SYSTEM_STUFF := $(filter-out libwpd libwpg libwps mythes mdds libexttextcat graphite jfreereport libvisio poppler libcmis, $(SYSTEM_STUFF))
  439. JUNIT_MIN_VER=
  440. PARALLEL_BUILD=n
  441. ENABLE_PDFIMPORT=n
  442. endif
  443. CONFIGURE_FLAGS += $(foreach i, $(SYSTEM_STUFF),--with-system-$(i))
  444. CC_PREFIX:=$(shell gcc -dumpmachine)-
  445. ifneq "$(GCC_VERSION)" ""
  446. ifneq "$(SYSTEM_GCC_VERSION)" "$(GCC_VERSION)"
  447. BUILD_DEPS += , gcc-$(GCC_VERSION), g++-$(GCC_VERSION)
  448. endif
  449. endif
  450. BUILDDEB_OPTIONS = -- -Zxz
  451. ifneq "$(OOO_OGLTRANS_ARCHS)" ""
  452. ifneq (,$(findstring mesa-headers,$(SYSTEM_STUFF)))
  453. BUILD_DEPS += , libgl1-mesa-dev$(OOO_NO_OGLTRANS_ARCHS), libglu1-mesa-dev$(OOO_NO_OGLTRANS_ARCHS)
  454. endif
  455. endif
  456. ifneq "$(ENABLE_OPENGL)" "y"
  457. CONFIGURE_FLAGS += --disable-opengl
  458. endif
  459. ifneq "$(PACKAGE_SDK)" "y"
  460. CONFIGURE_FLAGS += --disable-odk
  461. endif
  462. ifneq "$(ENABLE_MINIMIZER)" "y"
  463. CONFIGURE_FLAGS += --disable-ext-presenter-minimizer
  464. endif
  465. ifneq "$(ENABLE_PRESENTER_CONSOLE)" "y"
  466. CONFIGURE_FLAGS += --disable-ext-presenter-console
  467. endif
  468. ifeq "$(ENABLE_PDFIMPORT)" "y"
  469. BUILD_DEPS += , libpoppler-dev (>= 0.8.0), libpoppler-private-dev, libpoppler-cpp-dev
  470. else
  471. CONFIGURE_FLAGS += --disable-ext-pdfimport
  472. endif
  473. # fails their tests
  474. ifeq "$(DEB_HOST_ARCH)" "alpha"
  475. ENABLE_GRAPHITE=n
  476. SYSTEM_STUFF := $(filter-out graphite, $(SYSTEM_STUFF))
  477. endif
  478. ifeq "$(DEB_HOST_ARCH)" "armel"
  479. ENABLE_GRAPHITE=n
  480. SYSTEM_STUFF := $(filter-out graphite, $(SYSTEM_STUFF))
  481. endif
  482. ifeq "$(DEB_HOST_ARCH)" "sparc"
  483. ENABLE_GRAPHITE=n
  484. SYSTEM_STUFF := $(filter-out graphite, $(SYSTEM_STUFF))
  485. endif
  486. ifeq "$(ENABLE_GRAPHITE)" "y"
  487. ifneq (,$(filter graphite, $(SYSTEM_STUFF)))
  488. BUILD_DEPS += , libgraphite2-dev (>= 0.9.3) [!alpha !armel !sparc]
  489. endif
  490. else
  491. CONFIGURE_FLAGS += --disable-graphite
  492. endif
  493. ifneq (,$(filter libexttextcat, $(SYSTEM_STUFF)))
  494. BUILD_DEPS += , libexttextcat-dev (>= 3.1.1)
  495. TEXTCAT_DATA_RECOMMENDS := libexttextcat-data
  496. endif
  497. ifneq (,$(filter jpeg, $(SYSTEM_STUFF)))
  498. BUILD_DEPS += , libjpeg-dev
  499. endif
  500. ifneq (,$(filter libxml, $(SYSTEM_STUFF)))
  501. BUILD_DEPS += , libxml2-dev
  502. BUILD_DEPS += , libxslt1-dev
  503. DBG_DBG_SUGGESTS+= , libxslt1-dbg
  504. endif
  505. ifneq (,$(filter expat, $(SYSTEM_STUFF)))
  506. BUILD_DEPS += , libexpat1-dev
  507. endif
  508. ifneq (,$(filter odbc, $(SYSTEM_STUFF)))
  509. BUILD_DEPS += , unixodbc-dev (>= 2.2.11)
  510. endif
  511. ifneq (,$(filter sane, $(SYSTEM_STUFF)))
  512. BUILD_DEPS += , libsane-dev
  513. endif
  514. ifneq (,$(filter xextensions-headers, $(SYSTEM_STUFF)))
  515. BUILD_DEPS += , libxrender-dev
  516. endif
  517. ifneq (,$(filter libpng, $(SYSTEM_STUFF)))
  518. BUILD_DEPS += , libpng12-dev
  519. endif
  520. ifeq (,$(filter curl, $(SYSTEM_STUFF)))
  521. BUILD_DEPS += , libcurl4-$(CURL_SECTYPE)-dev
  522. endif
  523. ifneq (,$(filter openssl, $(SYSTEM_STUFF)))
  524. BUILD_DEPS += , libssl-dev
  525. ifeq "$(SQUEEZE_BACKPORT)" "y"
  526. DBG_DBG_SUGGESTS += , libssl$(shell readlink /usr/lib/libssl.so | cut -d"." -f3,4,5)-dbg
  527. else
  528. DBG_DBG_SUGGESTS += , libssl$(shell readlink /usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/libssl.so | cut -d"." -f3,4,5)-dbg
  529. endif
  530. endif
  531. ifneq "$(ENABLE_RSVG)" "y"
  532. ifeq "$(SYSTEM_LIBRSVG)" "y"
  533. BUILD_DEPS += , librsvg2-dev
  534. CONFIGURE_FLAGS += --enable-librsvg=auto
  535. else
  536. CONFIGURE_FLAGS += --enable-librsvg=internal
  537. endif
  538. else
  539. CONFIGURE_FLAGS += --enable-librsvg=no
  540. endif
  541. ifneq (,$(findstring db,$(SYSTEM_STUFF)))
  542. BUILD_DEPS += , libdb-dev
  543. DBG_DBG_SUGGESTS += , $(shell dpkg -s libdb-dev | grep Depends | awk '{ print $$2 }' | sed -e s/dev/dbg/)
  544. endif
  545. ifeq "$(BUILD_DBG_PACKAGE)" "y"
  546. ifneq (,$(findstring i386,$(DEB_HOST_ARCH)))
  547. SMALL_SYMBOLS = n
  548. else
  549. ifneq (,$(findstring amd64,$(DEB_HOST_ARCH)))
  550. SMALL_SYMBOLS = n
  551. endif
  552. endif
  553. DBG_DBG_SUGGESTS+= , libc6.1-dbg [alpha ia64], libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64], libc0.3-dbg [hurd-i386], libc6-dbg [!ia64 !alpha !kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libatk1.0-dbg, libglib2.0-0-dbg, libgnomevfs2-0-dbg, libstdc++6-$(SYSTEM_GCC_VERSION)-dbg, libx11-6-dbg, libxext6-dbg, libxaw7-dbg, libxml2-dbg, libgtk2.0-0-dbg, libxau6-dbg, libice6-dbg, libsm6-dbg, libxinerama1-dbg, libfontconfig1-dbg, libhunspell-$(shell pkg-config --modversion hunspell | cut -d. -f1,2)-0-dbg, libcurl4-dbg
  554. endif
  555. ifeq "$(ENABLE_SYMBOLS)" "y"
  556. # Small symbols?
  557. ifeq "$(SMALL_SYMBOLS)" "y"
  558. CONFIGURE_FLAGS += --enable-symbols=SMALL
  559. CFLAGS := $(shell echo $(CFLAGS) | sed -e "s/-g/-g1/")
  560. CXXFLAGS := $(shell echo $(CXXFLAGS) | sed -e "s/-g/-g1/")
  561. export CFLAGS CXXFLAGS
  562. else
  563. CONFIGURE_FLAGS += --enable-symbols
  564. endif
  565. endif
  566. ifeq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  567. CONFIGURE_FLAGS += --enable-debug
  568. endif
  569. # Build python depends from current python version
  570. PYMAJOR:=$(shell python -c "import sys; print sys.version_info[0]")
  571. PYMINOR:=$(shell python -c "import sys; print sys.version_info[1]")
  572. PYMINORPLUS1:=$(shell python -c "import sys; print sys.version_info[1]+1")
  573. PYTHON_SITE:=debian/python-uno/$(shell python -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
  574. PY3MAJOR:=$(shell python3 -c "import sys; print (sys.version_info[0])")
  575. PY3MINOR:=$(shell python3 -c "import sys; print (sys.version_info[1])")
  576. PY3MINORPLUS1:=$(shell python3 -c "import sys; print (sys.version_info[1]+1)")
  577. PYTHON3_SITE:=debian/python3-uno/$(shell python3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
  578. ifeq "$(BUILD_PYUNO)" "y"
  579. BUILD_DEPS += , python (>= 2.6.6-3+squeeze4)
  580. DBG_DBG_SUGGESTS+= , python-dbg
  581. BUILD_DEPS += , $(PYTHON)-dev (>= 2.6)
  582. ifeq "$(ENABLE_PYTHON3)" "y"
  583. BUILD_DEPS += , $(PYTHON3)-dev (>= 3.2)
  584. endif
  585. else
  586. BUILD_DEPS += , python
  587. endif
  588. BUILD_DEPS += , debhelper (>= 7.2.3~)
  589. ifeq "$(ENABLE_JAVA)" "y"
  590. ifeq "$(BUILD_JARS_NATIVE)" "y"
  591. STAMP_NATIVE_JARS = $(STAMP_DIR)/native-jars
  592. JAVA_GCJ_DEPENDS = libgcj-common (>= 1:4.1.1-14)
  593. endif
  594. endif
  595. ifeq "$(RUN_TESTTOOL)" "y"
  596. CONFIGURE_FLAGS += --enable-hids
  597. endif
  598. ifneq (,$(filter cppunit, $(SYSTEM_STUFF)))
  599. BUILD_DEPS += , libcppunit-dev (>= 1.12)
  600. endif
  601. ifeq "$(RUN_MAKE_CHECK)" "y"
  602. BUILD_DEPS += , gdb
  603. ifeq "$(ENABLE_JUNIT4)" "y"
  604. BUILD_DEPS += , junit4 $(JUNIT_MIN_VER)
  605. else
  606. CONFIGURE_FLAGS += --without-junit
  607. endif
  608. else
  609. CONFIGURE_FLAGS += --without-junit
  610. endif
  611. ifneq "$(BUILD_ONLY_EN_US)" "y"
  612. ifeq (lang=,$(findstring lang=,$(DEB_BUILD_OPTIONS)))
  613. ISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g')
  614. HELPISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g')
  615. LANGPACKISOS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^.*lang=\([^\s].*\)\s.*/\1/p' | awk '{ print $$1 }' | sed -e 's/,/ /g')
  616. else
  617. # Note that the first one here *has to be* en-US. the first one gets
  618. # gid_Module_Root as filelist later and the rest gid_Module_Root.$iso
  619. # but we can't/shouldn't do dynamic switching, so let en-US be the first
  620. # one to that gid_Module_Root always is english and the other langpacks
  621. # have gid_Module_Root.$iso
  622. #ISOS=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all')
  623. ISOS:=en-US af ar as ast be bg bn br bs ca ca-XV cs cy da de dz el \
  624. en-GB en-ZA eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja \
  625. ka km ko ku lt lv mk mn ml mr nb ne nl nn nr nso oc om or \
  626. pa-IN pl pt pt-BR ro ru rw si sk sl sr ss st sv \
  627. ta te tg th tn tr ts ug uk uz ve vi xh zh-CN zh-TW zu
  628. #HELPISOS:=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all')
  629. HELPISOS:=en-US ca ca-XV cs da de dz el en-GB es et eu fi fr gl hi hu it \
  630. ja km ko nl om pl pt pt-BR ru sk sl sv zh-CN zh-TW
  631. #LANGPACKISOS:=$(shell $(SOURCE_TREE)/bin/lo-xlate-lang -i all')
  632. LANGPACKISOS:=en-US af ar as ast be bg bn br bs ca ca-XV cs cy da de dz el \
  633. en-GB en-ZA eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja \
  634. ka km ko ku lt lv mk mn ml mr nb ne nl nn nr nso oc om or \
  635. pa-IN pl pt pt-BR ro ru rw si sk sl sr ss st sv \
  636. ta te tg th tn tr ts ug uk uz ve vi xh zh-CN zh-TW zu
  637. endif
  638. else
  639. ISOS=en-US
  640. HELPISOS=en-US
  641. LANGPACKISOS=en-US
  642. endif
  643. BUILD_ISOS = $(ISOS)
  644. ifneq "$(BUILD_ONLY_EN_US)" "y"
  645. ifneq "$(BUILD_ISOS)" "en-US"
  646. CONFIGURE_FLAGS += --with-lang="$(BUILD_ISOS)"
  647. endif
  648. endif
  649. ifeq "$(ENABLE_JAVA)" "y"
  650. ifeq "$(JDK)" "default"
  651. JAVA_HOME=/usr/lib/jvm/default-java
  652. BUILD_DEPS += , default-jdk$(OOO_NO_JAVA_ARCHS)
  653. endif
  654. ifeq "$(JDK)" "java-gcj-compat"
  655. JAVA_HOME=/usr/lib/jvm/java-gcj
  656. ifneq (,$(findstring armel,$(OOO_JAVA_ARCHS)))
  657. BUILD_DEPS += , gcj-4.3 (>= 4.3.1-2) [armel]
  658. endif
  659. endif
  660. ifeq "$(JDK)" "gcj-jdk"
  661. JAVA_HOME=/usr/lib/jvm/java-gcj
  662. BUILD_DEPS += , gcj-jdk$(OOO_NO_JAVA_ARCHS)
  663. endif
  664. ifeq "$(JDK)" "openjdk"
  665. ifeq "$(SQUEEZE_BACKPORT)" "y"
  666. BUILD_DEPS += , openjdk-$(JAVA_MAINVER)-jdk [$(filter-out $(OOO_GCJ_JDK_ARCHS),$(OOO_JAVA_ARCHS))]
  667. JAVA_HOME=/usr/lib/jvm/java-$(JAVA_MAINVER)-openjdk
  668. else
  669. ifeq "$(JAVA_MAINVER)" "6"
  670. BUILD_DEPS += , openjdk-$(JAVA_MAINVER)-jdk (>= 6b23~pre8-2) [$(filter-out ia64,$(filter-out $(OOO_GCJ_JDK_ARCHS),$(OOO_JAVA_ARCHS))])
  671. BUILD_DEPS += , openjdk-7-jdk [ia64]
  672. ifeq "$(DEB_HOST_ARCH)" "ia64"
  673. JAVA_MAINVER=7
  674. endif
  675. else
  676. BUILD_DEPS += , openjdk-$(JAVA_MAINVER)-jdk [$(filter-out $(OOO_GCJ_JDK_ARCHS),$(OOO_JAVA_ARCHS))]
  677. endif
  678. JAVA_HOME=/usr/lib/jvm/java-$(JAVA_MAINVER)-openjdk-$(DEB_HOST_ARCH)
  679. endif
  680. CONFIGURE_FLAGS += --with-java-target-version=1.5
  681. endif
  682. TEST_JAVA_HOME=$(JAVA_HOME)
  683. ifneq "$(OOO_GCJ_JDK_ARCHS)" ""
  684. BUILD_DEPS += , gcj-jdk [$(OOO_GCJ_JDK_ARCHS)]
  685. BUILD_DEPS += , gcj-native-helper [$(OOO_GCJ_ARCHS)], libgcj-common (>= 1:4.4.1) [$(OOO_GCJ_ARCHS)]
  686. endif
  687. ifeq "$(ENABLE_MEDIAWIKI)" "y"
  688. BUILD_DEPS += , ant (>= 1.7.0)$(OOO_NO_JAVA_ARCHS), ant-optional (>= 1.7.0)$(OOO_NO_JAVA_ARCHS)
  689. else
  690. BUILD_DEPS += , ant (>= 1.6.5)$(OOO_NO_JAVA_ARCHS)
  691. endif
  692. GCJ_VERSION = $(shell basename `readlink $(JAVA_HOME)/bin/gcj` | sed -e s/gcj-//)
  693. ifeq "$(SQUEEZE_BACKPORT)" "y"
  694. GCJ_JAWT_DEPENDS= $(shell dpkg -S /usr/lib/`readlink /usr/lib/libgcj_bc.so.1` | cut -d: -f1 | sed -e s/$$/-awt/)
  695. else
  696. GCJ_JAWT_DEPENDS= $(shell dpkg -S /usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/gcj-$(GCJ_JDK_VERSION)-*/libgcj_bc.so.1 | cut -d: -f1 | sed -e s/$$/-awt/)
  697. endif
  698. DBG_DBG_SUGGESTS+= , $(shell echo $(GCJ_AWT_DEPENDS) | sed -e s/awt/dbg/)
  699. JAVA_RUNTIME_DEPENDS = default-jre | gcj-jre | java-gcj-compat
  700. # ifneq (,$(GCJ_JAWT_DEPENDS))
  701. # JAVA_RUNTIME_DEPENDS += | $(GCJ_JAWT_DEPENDS)
  702. # endif
  703. ifneq (,$(filter $(DEB_HOST_ARCH), $(OOO_OPENJDK_ARCHS)))
  704. ifneq "$(DEB_HOST_ARCH)" "ia64"
  705. JAVA_RUNTIME_DEPENDS += | openjdk-6-jre | openjdk-7-jre
  706. else
  707. JAVA_RUNTIME_DEPENDS += | openjdk-7-jre
  708. endif
  709. endif
  710. ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386))
  711. JAVA_RUNTIME_DEPENDS += | sun-java5-jre | sun-java6-jre
  712. endif
  713. JAVA_RUNTIME_DEPENDS += | java5-runtime
  714. # Suns Java "packages"
  715. JAVA_RUNTIME_DEPENDS += | jre
  716. GCJ_JAWT_DIR=$(shell dirname `dpkg -L $(GCJ_JAWT_DEPENDS) | grep libjawt.so | head -n 1`)
  717. export JAVA_HOME
  718. CONFIGURE_FLAGS += --with-jdk-home=$(JAVA_HOME)
  719. JAVA_COMMON_DEPENDS= , libreoffice$(VER)-java-common
  720. JAVA_COMMON_DEPENDS_VERSION:= (>= $(BASE_VERSION)~)
  721. ifneq (,$(filter saxon, $(SYSTEM_STUFF)))
  722. CONFIGURE_FLAGS += --with-system-saxon --with-saxon-jar=/usr/share/java/saxonb.jar
  723. BUILD_DEPS += , libsaxonb-java$(OOO_NO_JAVA_ARCHS)
  724. endif
  725. ifeq "$(PACKAGE_SDK)" "y"
  726. ifeq "$(PACKAGE_UNOWINREG_DLL)" "y"
  727. ifeq "$(BUILD_UNOWINREG_DLL)" "y"
  728. CONFIGURE_FLAGS += --enable-build-unowinreg
  729. ifeq "$(SQUEEZE_BACKPORT)" "y"
  730. BUILD_DEPS += , gcc-mingw32 [$(OOO_UNOWINREG_DLL_ARCHS)], mingw32-runtime[$(OOO_UNOWINREG_DLL_ARCHS)]
  731. CONFIGURE_FLAGS += --with-mingw-cross-compiler=i586-mingw32msvc-g++
  732. else
  733. BUILD_DEPS += , g++-mingw-w64-i686 [$(OOO_UNOWINREG_DLL_ARCHS)]
  734. CONFIGURE_FLAGS += --with-mingw-cross-compiler=i686-w64-mingw32-g++
  735. endif
  736. endif
  737. endif
  738. endif
  739. ifeq "$(ENABLE_MEDIAWIKI)" "y"
  740. CONFIGURE_FLAGS += --enable-ext-wiki-publisher
  741. ifneq (,$(filter apache-commons, $(SYSTEM_STUFF)))
  742. MEDIAWIKI_BUILD_DEPS += , libcommons-codec-java$(OOO_NO_JAVA_ARCHS), libcommons-httpclient-java$(OOO_NO_JAVA_ARCHS), libcommons-lang-java$(OOO_NO_JAVA_ARCHS), libcommons-logging-java$(OOO_NO_JAVA_ARCHS)
  743. MEDIAWIKI_JAR_DEPENDS := , libcommons-codec-java, libcommons-httpclient-java, libcommons-lang-java, libcommons-logging-java
  744. BUILD_DEPS += $(MEDIAWIKI_BUILD_DEPS)
  745. CONFIGURE_FLAGS += --with-commons-codec-jar=/usr/share/java/commons-codec.jar --with-commons-lang-jar=/usr/share/java/commons-lang.jar --with-commons-httpclient-jar=/usr/share/java/commons-httpclient.jar --with-commons-logging-jar=/usr/share/java/commons-logging.jar
  746. CONFIGURE_FLAGS += --with-system-servlet-api
  747. ifeq "$(SQUEEZE_BACKPORT)" "y"
  748. BUILD_DEPS += (<< 1.1.1-9), $(shell dpkg -s libcommons-logging-java | grep Suggests | cut -d"," -f1 | sed -e s/^\ // | awk '{ print $$2 }')
  749. CONFIGURE_FLAGS += --with-servlet-api-jar=$(shell dpkg -L `dpkg -s libcommons-logging-java | grep Suggests | cut -d"," -f1 | sed -e s/^\ // | awk '{ print $$2 }'` | grep servlet-api.*\.jar$ | head -n 1)
  750. else
  751. BUILD_DEPS += (>= 1.1.1-9), $(shell dpkg -s libcommons-logging-java | grep Suggests | cut -d"," -f5 | sed -e s/^\ // | awk '{ print $$1 }')
  752. CONFIGURE_FLAGS += --with-servlet-api-jar=$(shell dpkg -L `dpkg -s libcommons-logging-java | grep Suggests | cut -d"," -f5 | sed -e s/^\ // | awk '{ print $$1 }'` | grep servlet-api.*\.jar$ | head -n 1)
  753. endif
  754. endif
  755. endif
  756. ifeq "$(ENABLE_REPORTDESIGN)" "y"
  757. # report-builder
  758. ifneq (,$(filter jfreereport, $(SYSTEM_STUFF)))
  759. REPORT_BUILDER_BUILD_DEPS += , libbase-java$(OOO_NO_REPORTDESIGN_ARCHS), libsac-java$(OOO_NO_REPORTDESIGN_ARCHS), libxml-java (>= 1.1.6)$(OOO_NO_REPORTDESIGN_ARCHS), libflute-java (>= 1.1.6)$(OOO_NO_REPORTDESIGN_ARCHS), libpentaho-reporting-flow-engine-java (>= 0.9.4)$(OOO_NO_REPORTDESIGN_ARCHS), liblayout-java (>= 0.2.10)$(OOO_NO_REPORTDESIGN_ARCHS), libloader-java (>= 1.1.6)$(OOO_NO_REPORTDESIGN_ARCHS), libformula-java (>= 1.1.7)$(OOO_NO_REPORTDESIGN_ARCHS), librepository-java (>= 1.1.6)$(OOO_NO_REPORTDESIGN_ARCHS), libfonts-java (>= 1.1.6)$(OOO_NO_REPORTDESIGN_ARCHS), libserializer-java (>= 1.1.6)$(OOO_NO_REPORTDESIGN_ARCHS)
  760. 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)
  761. BUILD_DEPS += $(REPORT_BUILDER_BUILD_DEPS)
  762. 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
  763. endif
  764. ifneq (,$(filter apache-commons, $(SYSTEM_STUFF)))
  765. REPORT_BUILDER_BUILD_DEPS += , libcommons-logging-java$(OOO_NO_JAVA_ARCHS)
  766. REPORT_BUILDER_JAR_DEPENDS += , libcommons-logging-java
  767. CONFIGURE_FLAGS += --with-commons-logging-jar=/usr/share/java/commons-logging.jar
  768. ifeq "$(SQUEEZE_BACKPORT)" "y"
  769. BUILD_DEPS += (<< 1.1.1-9), $(shell dpkg -s libcommons-logging-java | grep Suggests | cut -d"," -f1 | sed -e s/^\ // | awk '{ print $$2 }')
  770. CONFIGURE_FLAGS += --with-servlet-api-jar=$(shell dpkg -L `dpkg -s libcommons-logging-java | grep Suggests | cut -d"," -f1 | sed -e s/^\ // | awk '{ print $$2 }'` | grep servlet-api.*\.jar$ | head -n 1)
  771. else
  772. BUILD_DEPS += (>= 1.1.1-9), $(shell dpkg -s libcommons-logging-java | grep Suggests | cut -d"," -f5 | sed -e s/^\ // | awk '{ print $$1 }')
  773. CONFIGURE_FLAGS += --with-servlet-api-jar=$(shell dpkg -L `dpkg -s libcommons-logging-java | grep Suggests | cut -d"," -f5 | sed -e s/^\ // | awk '{ print $$1 }'` | grep servlet-api.*\.jar$ | head -n 1)
  774. endif
  775. endif
  776. else
  777. CONFIGURE_FLAGS += --disable-ext-report-builder
  778. endif
  779. OOO_OFFICEBEAN_DEP = libreoffice$(VER)-officebean
  780. BUILD_DEPS += , javahelper $(JAVAHELPER_MIN_VERSION)
  781. else
  782. CONFIGURE_FLAGS += --without-java
  783. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-officebean -Nlibreoffice$(VER)-java-common -Nlibreoffice$(VER)-filter-mobiledev -Nlibreoffice$(VER)-gcj -Nlibreoffice$(VER)-script-provider-bsh -Nlibreoffice$(VER)-script-provider-js
  784. endif
  785. ifneq (,$(filter nss, $(SYSTEM_STUFF)))
  786. BUILD_DEPS+= , libnss3-dev (>= 3.12.3)
  787. DBG_DBG_SUGGESTS+= , libnss3-1d-dbg
  788. endif
  789. ifneq (,$(filter mozilla-headers, $(SYSTEM_STUFF)))
  790. BUILD_DEPS+= , xulrunner-dev$(OOO_NO_NSPLUGIN_ARCHS)
  791. endif
  792. CONFIGURE_FLAGS += --disable-build-mozilla --disable-mozilla
  793. ifeq (,$(findstring $(DEB_HOST_ARCH),$(OOO_NSPLUGIN_ARCHS)))
  794. PACKAGE_NSPLUGIN=n
  795. CONFIGURE_FLAGS += --disable-nsplugin
  796. endif
  797. ifeq "$(USE_SYSTEM_DMAKE)" "y"
  798. BUILD_DEPS += , dmake (>= 1:4.11)
  799. endif
  800. ifneq (,$(filter hunspell, $(SYSTEM_STUFF)))
  801. BUILD_DEPS += , libhunspell-dev $(HUNSPELL_MIN_VER)
  802. endif
  803. CONFIGURE_FLAGS += --with-external-dict-dir=$(DICT_DIR)
  804. ifneq (,$(filter altlinuxhyph, $(SYSTEM_STUFF)))
  805. ifeq "$(USE_LIBHYPHEN)" "y"
  806. BUILD_DEPS += , libhyphen-dev $(LIBHYPHEN_MINVER)
  807. else
  808. BUILD_DEPS += , libaltlinuxhyph-dev $(LIBALTLINUXHYPH_MINVER)
  809. endif
  810. endif
  811. CONFIGURE_FLAGS += --with-external-hyph-dir=$(HYPH_DIR)
  812. ifneq "$(OOO_STLPORT_ARCHS)" ""
  813. LIBSTLPORT_MINVER= (>= 4.6.2-3)
  814. BUILD_DEPS += , libstlport4.6-dev $(LIBSTLPORT_MINVER) [$(OOO_STLPORT_ARCHS)]
  815. CONFIGURE_FLAGS += --without-stlport
  816. endif
  817. ifneq (,$(filter boost, $(SYSTEM_STUFF)))
  818. ifeq "$(BOOST_VERSION)" "1.34"
  819. ifeq "$(SYSTEM_GCC_VERSION)" "4.4"
  820. BUILD_DEPS += , libboost-dev (>= 1.34.1-15)
  821. else
  822. BUILD_DEPS += , libboost-dev
  823. endif
  824. ifeq "$(SYSTEM_GCC_VERSION)" "4.6"
  825. BUILD_DEPS += , g++-4.6 (>= 4.6.2-12)
  826. endif
  827. else
  828. ifneq "$(BOOST_VERSION)" "default"
  829. BUILD_DEPS += , libboost$(BOOST_VERSION)-dev $(BOOST_MINVER)
  830. #BUILD_DEPS += , libboost-thread$(BOOST_VERSION)-dev, libboost-program-options$(BOOST_VERSION)-dev
  831. else
  832. BUILD_DEPS += , libboost-dev $(BOOST_MINVER)
  833. #BUILD_DEPS += , libboost-thread-dev, libboost-program-options-dev
  834. endif
  835. endif
  836. endif
  837. ifneq (,$(filter mdds, $(SYSTEM_STUFF)))
  838. BUILD_DEPS += , libmdds-dev (>= 0.5.0)
  839. endif
  840. ifneq (,$(filter vigra, $(SYSTEM_STUFF)))
  841. BUILD_DEPS += , libvigraimpex-dev
  842. endif
  843. ifneq (,$(filter sampleicc, $(SYSTEM_STUFF)))
  844. BUILD_DEPS += , libsampleicc-dev, libicc-utils-dev
  845. endif
  846. ifeq "$(USE_EXTERNAL_CXXLIBS)" "y"
  847. ifneq (,$(filter libwpd, $(SYSTEM_STUFF)))
  848. BUILD_DEPS += , libwpd-dev (>= 0.9.0)
  849. endif
  850. ifneq (,$(filter sablot, $(SYSTEM_STUFF)))
  851. BUILD_DEPS += , libsablot0-dev (>= 1.0.2-4)
  852. endif
  853. ifneq (,$(filter mythes, $(SYSTEM_STUFF)))
  854. BUILD_DEPS += , libmythes-dev (>= 2:1.2)
  855. endif
  856. ifneq (,$(filter libwps, $(SYSTEM_STUFF)))
  857. BUILD_DEPS += , libwps-dev (>= 0.2.0)
  858. endif
  859. ifneq (,$(filter libwpg, $(SYSTEM_STUFF)))
  860. BUILD_DEPS += , libwpg-dev (>= 0.2.0)
  861. endif
  862. ifneq (,$(filter libvisio, $(SYSTEM_STUFF)))
  863. BUILD_DEPS += , libvisio-dev
  864. endif
  865. ifneq (,$(filter libcmis, $(SYSTEM_STUFF)))
  866. BUILD_DEPS += , libcmis-dev
  867. endif
  868. endif
  869. CONFIGURE_FLAGS += --with-external-thes-dir=$(THES_DIR)
  870. ifneq (,$(filter icu, $(SYSTEM_STUFF)))
  871. BUILD_DEPS += , libicu-dev $(ICU_MINVER)
  872. endif
  873. ifneq (,$(filter xmlsec, $(SYSTEM_STUFF)))
  874. BUILD_DEPS += , libxmlsec1-dev (>= 1.2.9), libxmlsec1-nss (>= 1.2.9), libxmlsec1-openssl (>= 1.2.9)
  875. endif
  876. ifeq "$(BUILD_CAIROCANVAS)" "y"
  877. ifneq (,$(filter cairo, $(SYSTEM_STUFF)))
  878. BUILD_DEPS+= , libcairo2-dev
  879. endif
  880. else
  881. CONFIGURE_FLAGS+= --disable-cairo
  882. endif
  883. ifeq "$(BUILD_KDE)" "n"
  884. CONFIGURE_FLAGS+= --disable-kde
  885. CONFIGURE_FLAGS-= --disable-kde4
  886. CONFIGURE_FLAGS+= --with-theme="$(patsubst $(DEFAULT_IMAGE),default,$(IMAGES))"
  887. else
  888. CONFIGURE_FLAGS += --disable-kde
  889. CONFIGURE_FLAGS += --enable-kde4
  890. KDE_ICONSET_DEP=libreoffice$(VER)-style-oxygen
  891. BUILD_DEPS += , kdelibs5-dev $(KDELIBS_MINVER)
  892. BUILD_DEPS += , libqt4-dev $(QT_MINVER)
  893. DBG_DBG_SUGGESTS+= , kdelibs5-dbg, libqt4-dbg
  894. ifeq "$(ENABLE_KDEAB)" "y"
  895. ADDITIONAL_SECTIONS += KDE4Experimental
  896. BUILD_DEPS += , kdepimlibs5-dev$(OOO_NO_BASE_ARCHS)
  897. else
  898. CONFIGURE_FLAGS+= --disable-kdeab
  899. endif
  900. endif
  901. ifeq "$(ENABLE_MYSQLNATIVE)" "y"
  902. CONFIGURE_FLAGS += --enable-ext-mysql-connector
  903. ifneq (,$(filter mysql, $(SYSTEM_STUFF)))
  904. ifneq (,$(filter mysql-cppconn, $(SYSTEM_STUFF)))
  905. BUILD_DEPS += , libmysqlclient-dev
  906. else
  907. BUILD_DEPS += , libmysqlclient-dev (>= 5.5~)
  908. endif
  909. endif
  910. ifneq (,$(filter mysql-cppconn, $(SYSTEM_STUFF)))
  911. BUILD_DEPS += , libmysqlcppconn-dev $(MYSQLCPPCONN_MINVER)
  912. endif
  913. endif
  914. ifeq "$(BUILD_GTK)" "n"
  915. CONFIGURE_FLAGS+= --disable-gtk
  916. DEBHELPER_OPTIONS+= -Nlibreoffice$(VER)-gtk -Nlibreoffice$(VER)-gnome
  917. CONFIGURE_FLAGS+= --with-theme="$(patsubst galaxy,default,$(IMAGES))"
  918. else
  919. BUILD_DEPS += , libgtk2.0-dev (>= 2.10)
  920. endif
  921. ifeq "$(BUILD_GTK3)" "y"
  922. BUILD_DEPS += , libgtk-3-dev (>= 3.2~)
  923. CONFIGURE_FLAGS+= --enable-gtk3
  924. ifneq (cairo,$(findstring cairo,$(SYSTEM_STUFF)))
  925. $(error GTK3 build fails without system-cairo!!)
  926. endif
  927. else
  928. DEBHELPER_OPTIONS+= -Nlibreoffice$(VER)-gtk3
  929. endif
  930. ifeq "$(ENABLE_EVO2)" "n"
  931. CONFIGURE_FLAGS += --disable-evolution2
  932. DEBHELPER_OPTIONS += -Nlibreoffice-evolution
  933. else
  934. CONFIGURE_FLAGS += --enable-evolution2
  935. BUILD_DEPS += , libebook1.2-dev$(OOO_NO_BASE_ARCHS)
  936. endif
  937. ifeq "$(ENABLE_SDBC_POSTGRESQL)" "y"
  938. BUILD_DEPS += , libpq-dev (>= 9.0~)
  939. else
  940. CONFIGURE_FLAGS += --disable-postgresql-sdbc
  941. endif
  942. ifeq "$(ENABLE_RANDR)" "y"
  943. BUILD_DEPS += , libxrandr-dev
  944. else
  945. CONFIGURE_FLAGS += --disable-randr
  946. endif
  947. ifeq "$(BUILD_BINFILTERS)" "y"
  948. CONFIGURE_FLAGS+= --enable-binfilter
  949. OOO_BINFILTER_DEP = libreoffice$(VER)-filter-binfilter
  950. endif
  951. ifneq "$(BUILD_PYUNO)" "y"
  952. DEBHELPER_OPTIONS+= -Npython-uno -Npython3-uno -Nlibreoffice-script-provider-python
  953. CONFIGURE_FLAGS += --disable-python
  954. endif
  955. ifeq "$(ENABLE_JAVA)" "y"
  956. ifneq (,$(filter lucene, $(SYSTEM_STUFF)))
  957. BUILD_DEPS += , liblucene2-java (>= 2.3.2)$(OOO_NO_JAVA_ARCHS)
  958. LUCENE_DEPENDS = liblucene2-java (>= 2.3.2)
  959. # safety measure; e.g. lucene 2.9 index cannot be handled by lucene 2.4
  960. LUCENE_CONFLICTS = liblucene2-java (<< $(shell dpkg -l liblucene2-java | grep ^ii | awk '{ print $$3 }' | cut -d. -f1,2)~)
  961. CONFIGURE_FLAGS += --with-lucene-core-jar=/usr/share/java/lucene-core.jar --with-lucene-analyzers-jar=/usr/share/java/lucene-analyzers.jar
  962. endif
  963. ifneq (,$(filter hsqldb, $(SYSTEM_STUFF)))
  964. BUILD_DEPS += , libhsqldb-java $(HSQLDB_MINVER)$(OOO_NO_JAVA_ARCHS)
  965. BASE_HSQLDB_DEPENDS = libhsqldb-java $(HSQLDB_MINVER), libhsqldb-java (<< $(HSQLDB_TOONEWVER)~)
  966. JAVA_GCJ_DEPENDS += , libhsqldb-java-gcj [$(OOO_GCJ_ARCHS)]
  967. else
  968. ifneq "$(JDK)" "openjdk"
  969. # hsqldb with jdk7 buildfix from jdk7.diff fails with gcj
  970. $(error hsqldb with jdk7 buildfix from jdk7.diff fails with gcj)
  971. endif
  972. endif
  973. ifeq "$(ENABLE_SCRIPT_PROVIDER_BSH)" "y"
  974. ifneq (,$(filter beanshell, $(SYSTEM_STUFF)))
  975. BUILD_DEPS += , bsh (>= 2.0b4)$(OOO_NO_JAVA_ARCHS)
  976. BSH_DEPENDS = bsh (>= 2.0b4)
  977. JAVA_GCJ_DEPENDS += , bsh-gcj [$(OOO_GCJ_ARCHS)]
  978. endif
  979. CONFIGURE_FLAGS += --enable-ext-scripting-beanshell
  980. else
  981. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-script-provider-bsh
  982. endif
  983. ifeq "$(ENABLE_SCRIPT_PROVIDER_JS)" "y"
  984. CONFIGURE_FLAGS += --enable-ext-scripting-javascript
  985. else
  986. DEBHELPER_OPTIONS += -Nlibreoffice$(VER)-script-provider-js
  987. endif
  988. endif
  989. ifneq (,$(filter lpsolve, $(SYSTEM_STUFF)))
  990. ifeq "$(USE_SHARED_LPSOLVE)" "y"
  991. BUILD_DEPS += , liblpsolve55-dev $(LPSOLVE_MIN_VERSION), lp-solve $(LPSOLVE_MIN_VERSION)
  992. LPSOLVE_DEP = lp-solve $(LPSOLVE_MIN_VERSION)
  993. else
  994. BUILD_DEPS += , liblpsolve55-dev $(LPSOLVE_MIN_VERSION)
  995. endif
  996. ifeq "$(USE_LIBSUITESPARSE)" "y"
  997. DBG_DBG_SUGGESTS+= , libsuitesparse-dbg
  998. BUILD_DEPS += , libsuitesparse-dev $(SUITESPARSE_MIN_VERSION)
  999. else
  1000. DBG_DBG_SUGGESTS+= , libufsparse-dbg
  1001. BUILD_DEPS += , libufsparse-dev
  1002. endif
  1003. endif
  1004. ifeq "$(USE_DBUS)" "y"
  1005. BUILD_DEPS += , libdbus-glib-1-dev (>= 0.70)
  1006. CONFIGURE_FLAGS += --enable-dbus
  1007. endif
  1008. ifeq "$(USE_GSTREAMER)" "y"
  1009. BUILD_DEPS += , libgstreamer-plugins-base0.10-dev
  1010. GSTREAMER_PLUGINS_SUGGESTS += , gstreamer0.10-plugins-base, gstreamer0.10-plugins-good, gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-bad, gstreamer0.10-ffmpeg
  1011. DBG_DBG_SUGGESTS+= , libgstreamer0.10-0-dbg
  1012. else
  1013. CONFIGURE_FLAGS += --disable-gstreamer
  1014. endif
  1015. ifneq (,$(filter neon, $(SYSTEM_STUFF)))
  1016. ifneq "$(NEON_SECTYPE)" "openssl"
  1017. BUILD_DEPS += , libneon$(NEONSONR)-$(NEON_SECTYPE)-dev
  1018. DBG_DBG_SUGGESTS+= , libneon$(NEONSONR)-$(NEON_SECTYPE)-dbg
  1019. else
  1020. BUILD_DEPS += , libneon$(NEONSONR)-dev
  1021. DBG_DBG_SUGGESTS+= , libneon$(NEONSONR)-dbg
  1022. endif
  1023. endif
  1024. ifeq "$(HELPISOS)" ""
  1025. CONFIGURE_FLAGS += --without-helppack-integration
  1026. endif
  1027. ifneq (,$(filter redland, $(SYSTEM_STUFF)))
  1028. BUILD_DEPS += , librdf0-dev (>= 1.0.8)
  1029. SHLIBS_OVERRIDE += -Xunordf
  1030. endif
  1031. ifeq "$(ENABLE_GIO)" "y"
  1032. CONFIGURE_FLAGS += --enable-gio --disable-gnome-vfs
  1033. BUILD_DEPS += , libglib2.0-dev (>= 2.15.0)
  1034. endif
  1035. ifeq "$(ENABLE_GVFS)" "y"
  1036. BUILD_DEPS += , libgnomevfs2-dev
  1037. else
  1038. CONFIGURE_FLAGS += --disable-gnome-vfs
  1039. endif
  1040. ifeq "$(ENABLE_GCONF)" "y"
  1041. BUILD_DEPS += , libgconf2-dev, liborbit2-dev
  1042. else
  1043. CONFIGURE_FLAGS += --disable-gconf
  1044. endif
  1045. BUILD_DEPS += , gettext
  1046. ifeq "$(PACKAGE_TTF_OPENSYMBOL)" "y"
  1047. BUILD_DEPS_INDEP += , fontforge
  1048. endif
  1049. # Use compiler cache? Include ccache in DEB_BUILD_OPTIONS for much faster rebuild times
  1050. # A complete build uses about 9G of compiler cache.
  1051. ifneq (ccache,$(findstring ccache,$(DEB_BUILD_OPTIONS)))
  1052. CONFIGURE_FLAGS += --disable-ccache
  1053. endif
  1054. ## Build n projects in parallel?
  1055. ## DEB_BUILD_OPTIONS=parallel=<n>
  1056. ## if not specified LibreOffices configure tries to find it out itself
  1057. NUM_CPUS=$(shell echo "$(DEB_BUILD_OPTIONS) " | sed -n 's/^\(.* \)\?parallel=\([0-9]\+\).*$$/\2/p')
  1058. AVAIL_CPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
  1059. ifeq "$(PARALLEL_BUILD)" "y"
  1060. # http://bugs.debian.org/622644
  1061. BUILD_DEPS += , make (>= 3.81-8.2)
  1062. ifneq "$(NUM_CPUS)" "$(AVAIL_CPUS)"
  1063. CONFIGURE_FLAGS += --with-num-cpus=$(NUM_CPUS)
  1064. endif
  1065. else
  1066. CONFIGURE_FLAGS += --with-num-cpus=1
  1067. endif
  1068. ifeq ($(GCC_VERSION),)
  1069. BUILD_PATH = /usr/lib/jvm/java-gcj/bin:$$PATH
  1070. else
  1071. ifeq ($(GCC_VERSION),snapshot)
  1072. BUILD_PATH = /usr/lib/jvm/java-gcj/bin:/usr/lib/gcc-snapshot/bin:$$PATH
  1073. BUILD_LD_LIBRARY_PATH = /usr/lib/gcc-snapshot/lib:$$LD_LIBRARY_PATH
  1074. BUILD_DEPS += , gcc-snapshot
  1075. else
  1076. BUILD_PATH = /usr/lib/jvm/java-gcj/bin:$(CURDIR)/debian/usr/bin:$$PATH
  1077. endif
  1078. endif
  1079. BUILD_PATH := $(CURDIR)/debian/usr/bin:$(BUILD_PATH)
  1080. BUILD_LD_LIBRARY_PATH := $(BUILD_LD_LIBRARY_PATH):$(GCJ_JAWT_DIR)
  1081. ifeq "$(ENABLE_LDAP)" "y"
  1082. ifeq "$(USE_OPENLDAP)" "y"
  1083. BUILD_DEPS += , libldap2-dev
  1084. LDAP_LIB := $(shell echo libldap-`grep LDAP_VENDOR_VERSION_M /usr/include/ldap_features.h | cut -d: -f2 | awk '{ print $$3 }' | xargs | sed -e "s/ /\./"`-`grep LDAP_VENDOR_VERSION_MAJOR /usr/include/ldap_features.h | cut -d: -f2 | awk '{ print $$3 }'`)
  1085. CONFIGURE_FLAGS += --with-openldap
  1086. endif
  1087. else
  1088. CONFIGURE_FLAGS += --disable-ldap
  1089. endif
  1090. # Because of the stampdir magic, when you actually want to run a rule
  1091. # over, you would have to remove the stamp manually. Now, just do
  1092. # 'debian/rules <target> <target> ... FORCE=1', and the stamp files
  1093. # that match the given targets will be removed automagically.
  1094. stampdir_targets=files.backup icons.scale patch.apply build.prepare.artwork
  1095. stampdir_targets+=build.prepare configure
  1096. stampdir_targets+=setupins setup install install-arch install-indep
  1097. stampdir_targets+=langpacks binary-common binary-arch binary-indep
  1098. ifdef FORCE
  1099. DUMMY:=$(shell rm -f $(patsubst %,$(STAMP_DIR)/%,$(filter $(stampdir_targets),$(MAKECMDGOALS))))
  1100. endif
  1101. # If this is defined, then none of the 'long' commands will be run. Useful
  1102. # for testing.
  1103. # test_rules=1
  1104. # Since the final stages use up a large amount of diskspace, provide targets to
  1105. # remove them without needing a full rebuild
  1106. # Clean up the package directories (about 830M)
  1107. clean-debdir:
  1108. dh_testdir
  1109. rm -f debian/*.postinst debian/*.postrm debian/*.preinst debian/*.prerm debian/*.triggers
  1110. dh_clean
  1111. clean:
  1112. dh_testroot
  1113. dh_testdir
  1114. # remove generated symlinks / java wrappers
  1115. rm -rf debian/usr
  1116. if [ -f config.status ]; then \
  1117. $(MAKE) distclean; \
  1118. rm -f config.status; \
  1119. fi
  1120. find $(SOURCE_TREE)/solenv/gdb -name "*.pyc" -exec rm {} \;
  1121. rm -rf */*.pro.obsolete
  1122. rm -rf $(SOURCE_TREE)/file-lists
  1123. rm -rf $(SOURCE_TREE)/pyuno-py3
  1124. rm -f configure aclocal.m4
  1125. rm -f build_error.log
  1126. ifeq "$(HELPISOS)" ""
  1127. rm -rf images*
  1128. endif
  1129. # Files created in debian directory
  1130. $(MAKE) -f debian/rules clean-debdir
  1131. find debian -name "*.links" -exec rm {} \;
  1132. if [ -d "$(STAMP_DIR)" ]; then rm -rf "$(STAMP_DIR)"; fi
  1133. rm -f debian/shlibs.override.stdlibs
  1134. rm -f debian/*.bug-script
  1135. rm -f debian/scripts/aotcompile.py*
  1136. rm -f l10n.fdupes
  1137. rm -f debian/shlibs.local
  1138. rm -f debian/*.templates
  1139. rm -f debian/libreoffice-dev-doc.doc-base.*
  1140. rm -f debian/*.menu
  1141. for i in base calc core common draw impress math writer; do \
  1142. rm -f debian/libreoffice-$$i.lintian-overrides; \
  1143. done
  1144. rm -f debian/*.install debian/*.dirs debian/*.changelog
  1145. rm -f debian/catalog.xml
  1146. rm -f debian/openoffice.org-dtd-officedocument1.0.xmlcatalogs
  1147. rm -f download.list
  1148. $(MAKE) -f debian/rules control
  1149. # Generate control file, because we have so many different languages
  1150. # Based on script by Martin Quinson <Martin.Quinson@tuxfamily.org>
  1151. control: debian/control
  1152. debian/control: $(wildcard debian/control*in) $(SOURCE_TREE)/bin/lo-xlate-lang debian/rules
  1153. chmod 755 $(SOURCE_TREE)/bin/lo-xlate-lang
  1154. sed -e "s#libreofficeVER#libreoffice$(VER)#g" \
  1155. -e "s#libreofficeVER#libreoffice$(VER)#g" \
  1156. -e "s#%$(DEB_VENDOR)=\([^%]*\)%#, \1#g#" \
  1157. -e "s#%[A-Za-z]*=[^%]*%##g#" \
  1158. -e "s#%BUILD_DEPS%#$(strip $(BUILD_DEPS))#g" \
  1159. -e "s#%BUILD_DEPS_INDEP%#$(strip $(BUILD_DEPS_INDEP))#g" \
  1160. -e "s#@PYTHON_VERSION@#$(PYTHON_VERSION)#g" \
  1161. -e "s#@BUGS@#$(BUGS)#g" \
  1162. < debian/control.in > debian/control
  1163. ifeq "$(ENABLE_LDAP)" "y"
  1164. # build-depends might not be satified when running debian/rules control. prevent bad subsitition with
  1165. # nothing (libldap--)
  1166. if [ ! -f /usr/include/ldap_features.h ]; then \
  1167. echo "/usr/include/ldap_features.h not found. Is libldap2-dev installed?"; \
  1168. echo 'Needed for properly setting $$(LDAP_LIB). Stopping,'; \
  1169. exit 1; \
  1170. fi
  1171. endif
  1172. for LNUM in $(filter-out en-US,$(LANGPACKISOS)) ; do \
  1173. LNAME=`$(SOURCE_TREE)/bin/lo-xlate-lang -l $$LNUM | perl -e 'print ucfirst(<STDIN>);'`; \
  1174. LCODE=`$(SOURCE_TREE)/bin/lo-xlate-lang -i $$LNUM | tr A-Z a-z`; \
  1175. [ "$$LNUM" = ca-XV ] && continue; \
  1176. CCODE=`echo $$LCODE | sed 's/-.*//'`; \
  1177. case "$$LCODE" in \
  1178. bn|gu|pa-in|ml|or|te|ta) \
  1179. FONT_SUGGESTS=", ttf-`echo $$LNAME | tr A-Z a-z`-fonts"; \
  1180. ;; \
  1181. hi-in|ne|mr) \
  1182. FONT_SUGGESTS=", ttf-devanagari-fonts"; \
  1183. ;; \
  1184. he) \
  1185. FONT_SUGGESTS=", culmus"; \
  1186. ;; \
  1187. km) \
  1188. FONT_SUGGESTS=", ttf-khmeros"; \
  1189. ;; \
  1190. ar) \
  1191. FONT_SUGGESTS=", ttf-arabeyes"; \
  1192. ;; \
  1193. fa) \
  1194. FONT_SUGGESTS=", ttf-farsiweb"; \
  1195. ;; \
  1196. dz) \
  1197. FONT_SUGGESTS=", ttf-dzongkha"; \
  1198. ;; \
  1199. th) \
  1200. if [ "$(SQUEEZE_BACKPORT)" != "y" ]; then \
  1201. FONT_SUGGESTS=", fonts-thai-tlwg"; else \
  1202. FONT_SUGGESTS=", ttf-thai-tlwg"; fi; \
  1203. ;; \
  1204. *) \
  1205. FONT_SUGGESTS= ;; \
  1206. esac; \
  1207. case "$$LCODE" in \
  1208. rw) \
  1209. LOCALES_DEPENDS="locales (>= 2.3.6) | belocs-locales-data | locales-all (>= 2.3.6)" \
  1210. ;; \
  1211. ss|ts|km|ns|tn) \
  1212. LOCALES_DEPENDS="locales (>= 2.3.5-12) | belocs-locales-data | locales-all" \
  1213. ;; \
  1214. sr) \
  1215. LOCALES_DEPENDS="locales (>= 2.3.6.ds1-5) | belocs-locales-data | locales-all" \
  1216. ;; \
  1217. as|or|nr) \
  1218. LOCALES_DEPENDS="locales (>= 2.3.6.ds1-1) | locales-all (>= 2.3.6.ds1-1)" \
  1219. ;; \
  1220. sw) \
  1221. LOCALES_DEPENDS="locales (>= 2.13-5) | locales-all (>= 2.13-5)" \
  1222. ;; \
  1223. *) \
  1224. LOCALES_DEPENDS="locales | belocs-locales-data | locales-all" \
  1225. ;; \
  1226. esac; \
  1227. sed -e "s|@LNAME@|$$LNAME|g" -e "s|@LCODE@|$$LCODE|g" \
  1228. -e "s|@CCODE@|$$CCODE|g" \
  1229. -e "s|@FONT_SUGGESTS@|$$FONT_SUGGESTS|g" \
  1230. -e "s:@LOCALES_DEPENDS@:$$LOCALES_DEPENDS:g" \
  1231. -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1232. -e "s|@LDAP_LIB@|$(LDAP_LIB)|g" \
  1233. >> debian/control < debian/control.lang.in; \
  1234. done
  1235. ifneq "$(HELPISOS)" ""
  1236. for LNUM in $(HELPISOS) ; do \
  1237. LNAME=`$(SOURCE_TREE)/bin/lo-xlate-lang -l $$LNUM | perl -e 'print ucfirst(<STDIN>);'`; \
  1238. LCODE=`$(SOURCE_TREE)/bin/lo-xlate-lang -i $$LNUM | tr A-Z a-z`; \
  1239. [ "$$LNUM" = ca-XV ] && continue; \
  1240. CCODE=`echo $$LCODE | sed 's/-.*//'`; \
  1241. sed -e "s|@LNAME@|$$LNAME|g" -e "s|@LCODE@|$$LCODE|g" \
  1242. -e "s|@CCODE@|$$CCODE|g" \
  1243. -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1244. >> debian/control < debian/control.help.in; \
  1245. done
  1246. # en_US is in -common
  1247. perl -pi -e 's|(Depends: libreoffice$(VER)-writer \| language-support-translations-en), libreoffice$(VER)-l10n-en-us|\1|' \
  1248. debian/control
  1249. perl -pi -e 's|(Depends: libreoffice$(VER)-writer, libreoffice$(VER)-l10n-en-us)|\1, ttf-devanagari-fonts|' \
  1250. debian/control
  1251. endif
  1252. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1253. >> debian/control < debian/control.ure.in
  1254. ifeq "$(ENABLE_JAVA)" "y"
  1255. ifneq "$(OOO_GCJ_JDK_ARCHS)" ""
  1256. # ifeq "$(BUILD_JARS_NATIVE)" "y"
  1257. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1258. >> debian/control < debian/control.gcj.in
  1259. # endif
  1260. endif
  1261. endif
  1262. ifneq "$(OOO_NSPLUGIN_ARCHS)" ""
  1263. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1264. >> debian/control < debian/control.mozilla.in
  1265. endif
  1266. ifneq "$(OOO_OGLTRANS_ARCHS)" ""
  1267. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1268. >> debian/control < debian/control.ogltrans.in
  1269. endif
  1270. ifeq "$(ENABLE_JAVA)" "y"
  1271. ifeq "$(ENABLE_MEDIAWIKI)" "y"
  1272. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1273. >> debian/control < debian/control.mediawiki.in
  1274. endif
  1275. ifeq "$(ENABLE_REPORTDESIGN)" "y"
  1276. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1277. >> debian/control < debian/control.reportdesign.in
  1278. endif
  1279. endif
  1280. ifeq "$(ENABLE_MINIMIZER)" "y"
  1281. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1282. >> debian/control < debian/control.minimizer.in
  1283. endif
  1284. ifeq "$(ENABLE_PRESENTER_CONSOLE)" "y"
  1285. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1286. >> debian/control < debian/control.presenter.in
  1287. endif
  1288. ifeq "$(ENABLE_PDFIMPORT)" "y"
  1289. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1290. >> debian/control < debian/control.pdfimport.in
  1291. endif
  1292. ifeq "$(PACKAGE_TTF_OPENSYMBOL)" "y"
  1293. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1294. >> debian/control < debian/control.fonts.in
  1295. endif
  1296. ifeq "$(BUILD_DBG_PACKAGE)" "y"
  1297. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1298. >> debian/control < debian/control.debug.in
  1299. endif
  1300. ifeq "$(PACKAGE_SDK)" "y"
  1301. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1302. >> debian/control < debian/control.sdk.in
  1303. endif
  1304. ifeq "$(BUILD_KDE)" "y"
  1305. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1306. >> debian/control < debian/control.kde.in
  1307. perl -pi -e 's/ libreoffice$(VER)-gnome,/ libreoffice-gnome | libreoffice$(VER)-kde,/' debian/control
  1308. endif
  1309. ifeq "$(ENABLE_SDBC_POSTGRESQL)" "y"
  1310. sed -e "s|libreofficeVER|libreoffice$(VER)|g" \
  1311. >> debian/control < debian/control.postgresql.in
  1312. endif
  1313. ifeq "$(ENABLE_MYSQLNATIVE)" "y"
  1314. sed -e "s|lib…

Large files files are truncated, but you can click here to view the full file