Build firebird 2.5 internally. Also adds libatomic_ops.

Change-Id: I44a45e781dfb3624cdebf4530ae44870bf39a82a
This commit is contained in:
Andrzej J.R. Hunt 2013-06-14 14:55:22 +01:00
parent 8c325831b3
commit 0f16fa0fa5
18 changed files with 182 additions and 52 deletions

View File

@ -47,6 +47,8 @@ $(eval $(call gb_Library_use_externals,merged,\
icuuc \
jpeg \
lcms2 \
libatomic_ops \
libfbembed \
liblangtag \
libxml2 \
libxslt \

View File

@ -74,10 +74,9 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
@mkdir -p $(TARFILE_LOCATION)/tmp
@date >> $(fetch_LOGFILE)
$(foreach item, \
$(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
,$(call fetch_Download_item_special,http://people.igalia.com/agomez/files,$(item)))
$(foreach item, \
$(call fetch_Optional,LIBATOMIC_OPS,LIBATOMIC_OPS_TARBALL) \
$(call fetch_Optional,CDR,CDR_TARBALL) \
$(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
$(call fetch_Optional,MWAW,MWAW_TARBALL) \
$(call fetch_Optional,VISIO,VISIO_TARBALL) \

View File

@ -653,6 +653,48 @@ gb_LinkTarget__use_jawt :=
endif # $(OS)$(COM) = WNTGCC
ifeq ($(SYSTEM_LIBATOMIC_OPS),YES)
define gb_LinkTarget__use_libatomic_ops
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(LIBATOMIC_OPS_CFLAGS) \
)
$(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
endef
gb_ExternalProject__use_libatomic_ops :=
else # !SYSTEM_LIBATOMIC_OPS
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
libatomic-ops-7.2d \
))
define gb_LinkTarget__use_libatomic_ops
$(call gb_LinkTarget_set_include,$(1),\
$(LIBATOMIC_OPS_CFLAGS) \
$$(INCLUDE) \
$(LIBATOMIC_OPS_CFLAGS) \
)
$(call gb_LinkTarget_use_package,$(1),\
libatomic_ops \
)
$(call gb_LinkTarget_use_static_libraries,$(1),\
libatomic_ops \
)
endef
define gb_ExternalProject__use_libatomic_ops
$(call gb_ExternalProject_use_package,$(1),libatomic_ops)
endef
endif # SYSTEM_LIBATOMIC_OPS
ifeq ($(SYSTEM_LIBEXTTEXTCAT),YES)
define gb_LinkTarget__use_libexttextcat
@ -2052,6 +2094,8 @@ ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
ifeq ($(SYSTEM_FIREBIRD),YES)
$(call gb_LinkTarget__use_libatomic_ops,$(1))
define gb_LinkTarget__use_firebird
$(call gb_LinkTarget_set_include,$(1),\
$(FIREBIRD_CFLAGS) \
@ -2066,37 +2110,26 @@ endef
else # !SYSTEM_FIREBIRD
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
firebird \
#$(call gb_LinkTarget__use_libatomic_ops,$(1))
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
fbembed \
))
define gb_LinkTarget__use_firebird
$(call gb_LinkTarget_use_unpacked,$(1),firebird)
define gb_LinkTarget__use_libfbembed
$(call gb_LinkTarget_use_package,$(1),firebird)
$(call gb_LinkTarget_set_include,$(1),\
-I$(OUTDIR)/inc/external/firebird \
$$(INCLUDE) \
-I$(call gb_UnpackedTarball_get_dir,firebird)/src/include \
-I$(call gb_UnpackedTarball_get_dir,firebird)/src/include/gen \
-I$(call gb_UnpackedTarball_get_dir,firebird)/src/jrd \
)
$(call gb_LinkTarget_use_libraries,$(1),\
firebird \
fbembed \
)
endef
# $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
# atomic_ops \
# ))
# define gb_LinkTarget__use_atomic_ops
# $(call gb_LinkTarget_use_static_libraries,$(1),\
# atomic_ops \
# )
# endef
# define gb_ExternalProject__use_atomic_ops
# $(call gb_ExternalProject_use_package,$(1),atomic_ops)
# $(call gb_ExternalProject_use_static_libraries,$(1),atomic_ops)
# endef
# define gb_LinkTarget__use_tommath
# $(call gb_LinkTarget_set_include,$(1),\
# $(TOMMATH_CFLAGS) \

View File

@ -73,6 +73,7 @@ $(eval $(call gb_Module_add_moduledirs,cross_toolset,\
framework \
harfbuzz \
lcms2 \
libfbembed \
linguistic \
nss \
package \

View File

@ -62,6 +62,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
extras \
fileaccess \
filter \
$(call gb_Helper_optional,LIBATOMIC_OPS,libatomic_ops) \
$(call gb_Helper_optional,FIREBIRD,firebird) \
$(call gb_Helper_optional,FONTCONFIG,fontconfig) \
$(call gb_Helper_optional,DBCONNECTIVITY,forms) \

View File

@ -25,6 +25,8 @@ export AR=@AR@
export ASSERT_ALWAYS_ABORT=@ASSERT_ALWAYS_ABORT@
export ATL_INCLUDE=@ATL_INCLUDE@
export ATL_LIB=@ATL_LIB@
export LIBATOMIC_OPS_CFLAGS=$(gb_SPACE)@LIBATOMIC_OPS_CFLAGS@
export LIBATOMIC_OPS_LIBS=$(gb_SPACE)@LIBATOMIC_OPS_LIBS@
export AWTLIB=@AWTLIB@
export BARCODE_EXTENSION_PACK=@BARCODE_EXTENSION_PACK@
export BOOST_CPPFLAGS=@BOOST_CPPFLAGS@
@ -481,6 +483,7 @@ export SYSTEM_LCMS2=@SYSTEM_LCMS2@
export SYSTEM_LIBC=@SYSTEM_LIBC@
export SYSTEM_CDR=@SYSTEM_CDR@
export SYSTEM_CMIS=@SYSTEM_CMIS@
export SYSTEM_LIBATOMIC_OPS=@SYSTEM_LIBATOMIC_OPS@
export SYSTEM_LIBEXTTEXTCAT=@SYSTEM_LIBEXTTEXTCAT@
export SYSTEM_LIBEXTTEXTCAT_DATA=@SYSTEM_LIBEXTTEXTCAT_DATA@
export SYSTEM_LIBLANGTAG=@SYSTEM_LIBLANGTAG@

View File

@ -7400,6 +7400,11 @@ dnl Check for system libcmis
dnl ===================================================================
libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.3 >= 0.3.1])
dnl ===================================================================
dnl Check for system libatomic-ops
dnl ===================================================================
libo_CHECK_SYSTEM_MODULE([libatomic_ops],[ATOMIC_OPS],[libatomic_ops >= 0.7.2])
dnl ===================================================================
dnl Check for system libwpd
dnl ===================================================================
@ -8129,11 +8134,13 @@ if test "x$enable_firebird_sdbc" != "xno"; then
AC_MSG_RESULT([internal])
SYSTEM_FIREBIRD=NO
FIREBIRD_CFLAGS="-I${WORKDIR}/UnpackedTarball/firebird/include"
FIREBIRD_LIBS="-L${OUTDIR}/lib -lfbembed"
FIREBIRD_LIBS="-lfbembed"
dnl FIREBIRD_LIBS="-L${OUTDIR}/lib -lfbclient"
AC_CHECK_HEADERS(atomic_ops.h, [],
[AC_MSG_ERROR(atomic_ops.h not found. install Libatomic-ops)], [])
if test "$SYSTEM_LIBATOMIC_OPS" = "YES"; then
AC_CHECK_HEADERS(atomic_ops.h, [],
[AC_MSG_ERROR(atomic_ops.h not found. install libatomic-ops)], [])
fi
dnl TODO: Checking to build IBPP in case we want to use it for the SDBC driver

View File

@ -12,7 +12,7 @@ $(eval $(call gb_Library_Library,firebird-sdbc))
$(eval $(call gb_Library_use_sdk_api,firebird-sdbc))
$(eval $(call gb_Library_use_externals,firebird-sdbc,\
firebird \
libfbembed \
))
$(eval $(call gb_Library_set_include,firebird-sdbc,\

View File

@ -10,6 +10,8 @@ FIREBIRD_MD5SUM := 21154d2004e025c8a3666625b0357bb5
export FIREBIRD_TARBALL := Firebird-2.5.2.26540-0.tar.bz2
# FIREBIRD_MD5SUM := b259c2d1c60a03bd104108405ae990a7
# export FIREBIRD_TARBALL := Firebird-3.0-alpha1-20130302.tar.gz
LIBATOMIC_OPS_MD5SUM := c0b86562d5aa40761a87134f83e6adcf
export LIBATOMIC_OPS_TARBALL := libatomic_ops-7_2d.zip
export AFMS_TARBALL := 1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz
export APACHE_COMMONS_CODEC_TARBALL := 2e482c7567908d334785ce7d69ddfff7-commons-codec-1.6-src.tar.gz

View File

@ -11,12 +11,12 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,firebird,firebird))
$(eval $(call gb_ExternalPackage_use_external_project,firebird,firebird))
$(eval $(call gb_ExternalPackage_add_unpacked_files,firebird,inc/external/firebird,\
gen/firebird/include/ib_util.h \
gen/firebird/include/ibase.h \
gen/firebird/include/iberror.h \
gen/firebird/include/perf.h \
))
#$(eval $(call gb_ExternalPackage_add_unpacked_files,firebird,inc/external/firebird,\
# gen/firebird/include/ib_util.h \
# gen/firebird/include/ibase.h \
# gen/firebird/include/iberror.h \
# gen/firebird/include/perf.h \
#))
# Need to be added?
# $(eval $(call gb_ExternalPackage_add_unpacked_files,firebird,share/firebird,\
@ -39,8 +39,9 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,firebird,inc/external/firebi
# gen/firebird/security2.fdb \
# ))
$(eval $(call gb_ExternalPackage_add_library_for_install,firebird,lib/libfbembed.so.2.5.2,gen/firebird/lib/libfbembed.so.2.5.2))
$(eval $(call gb_ExternalPackage_add_file,firebird,lib/libfbembed.so.2.5.2,gen/firebird/lib/libfbembed.so.2.5.2))
$(eval $(call gb_ExternalPackage_add_library_for_install,firebird,lib/libfbembed.so.2.5.2,gen/firebird/lib/libfbembed.so.2.5.2))
$(eval $(call gb_ExternalPackage_add_file,firebird,lib/libfbembed.so,gen/firebird/lib/libfbembed.so.2.5.2))
# vim: set noet sw=4 ts=4:

View File

@ -9,20 +9,14 @@
$(eval $(call gb_ExternalProject_ExternalProject,firebird))
$(eval $(call gb_ExternalProject_use_unpacked,firebird,firebird))
$(eval $(call gb_ExternalProject_use_autoconf,firebird,build))
$(eval $(call gb_ExternalProject_use_externals,firebird,\
boost_headers \
icu \
libatomic_ops \
))
# Dependency in 2.5
# $(eval $(call gb_ExternalProject_use_packages,firebird, \
# atomic_op \
# ))
# Dependency in 3.0
# $(eval $(call gb_ExternalProject_use_packages,firebird, \
# tommath \
@ -37,18 +31,14 @@ $(eval $(call gb_ExternalProject_register_targets,firebird,\
$(call gb_ExternalProject_get_state_target,firebird,build):
$(call gb_ExternalProject_run,build,\
unset MAKEFLAGS && \
export CFLAGS="$(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden)" \
&& export LDFLAGS="-L$(OUTDIR)/lib \
&& LDFLAGS="-L$(OUTDIR)/lib \
$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib") \
$(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \
&& CPPFLAGS="-I$(OUTDIR)/inc/external $(if $(SYSBASE),-I$(SYSBASE)/usr/include)" \
&& export ICU_LIBS=" " \
&& export ICU_CFLAGS="$(if $(filter NO,$(SYSTEM_ICU)),\
-I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/common, )" \
&& export PKG_CONFIG="" \
&& ./configure \
--with-system-icu \
--without-editline \
--disable-superserver \
$(if $(filter NO,$(SYSTEM_BOOST)),CXXFLAGS=-I$(call gb_UnpackedTarball_get_dir,boost),CXXFLAGS=$(BOOST_CPPFLAGS)) \

View File

@ -10,13 +10,11 @@
$(eval $(call gb_Module_Module,firebird))
ifeq ($(SYSTEM_FIREBIRD),NO)
$(eval $(call gb_Module_add_targets,firebird,\
UnpackedTarball_firebird \
))
$(eval $(call gb_Module_add_targets,firebird,\
ExternalPackage_firebird \
ExternalProject_firebird \
UnpackedTarball_firebird \
))
endif

View File

@ -0,0 +1,20 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalPackage_ExternalPackage,libatomic_ops,libatomic_ops))
$(eval $(call gb_ExternalPackage_use_external_project,libatomic_ops,libatomic_ops))
ifeq ($(OS)$(COM),WNTMSC)
$(eval $(call gb_ExternalPackage_add_file,libatomic_ops,lib/atomic_ops-7.2d.lib,src/lib/.libs/libatomic_ops-7.2d.lib))
else
$(eval $(call gb_ExternalPackage_add_file,libatomic_ops,lib/libatomic_ops-7.2d.a,src/lib/.libs/libatomic_ops-7.2d.a))
endif
# vim: set noet sw=4 ts=4:

View File

@ -0,0 +1,26 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalProject_ExternalProject,libatomic_ops))
$(eval $(call gb_ExternalProject_use_autoconf,libatomic_ops,build))
$(eval $(call gb_ExternalProject_register_targets,libatomic_ops,\
build \
))
$(call gb_ExternalProject_get_state_target,libatomic_ops,build) :
$(call gb_ExternalProject_run,build,\
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)" CXXFLAGS="$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)") \
./configure \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
&& $(MAKE) \
)
# vim: set noet sw=4 ts=4:

7
libatomic_ops/Makefile Normal file
View File

@ -0,0 +1,7 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:

View File

@ -0,0 +1,22 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Module_Module,libatomic_ops))
ifeq ($(SYSTEM_ATOMIC_OPS),NO)
$(eval $(call gb_Module_add_targets,libatomic_ops,\
ExternalProject_libatomic_ops \
ExternalPackage_libatomic_ops \
UnpackedTarball_libatomic_ops \
))
endif
# vim: set noet sw=4 ts=4:

4
libatomic_ops/README Normal file
View File

@ -0,0 +1,4 @@
From [https://github.com/ivmai/libatomic_ops/].
Note that some files (linked into libatomic_ops_gpl) are GPL'd, the portion
needed for Firebird (ibatomic_ops) is however MIT licensed.

View File

@ -0,0 +1,14 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UnpackedTarball_UnpackedTarball,libatomic_ops))
$(eval $(call gb_UnpackedTarball_set_tarball,libatomic_ops,$(LIBATOMIC_OPS_TARBALL)))
# vim: set noet sw=4 ts=4: