Kaydet (Commit) 45f42681 authored tarafından Wastack's avatar Wastack Kaydeden (comit) Lionel Elie Mamane

GSoC Upgrade firebird to 3.0

Embedded firebird is now version 3.0.

Supports MSVC 14.0.

Instead of fbembed, there are now two libraries: fbclient and
Engine12. fbclient is linked as fbembed before, Engine12 is loaded
at runtime from fbclient.

fb now needs system libtommath, which is supplied
as a new ExternalProject of LO.

Change-Id: I132939bdee745795b22f675e4265e9590079c45f
Reviewed-on: https://gerrit.libreoffice.org/27642Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst 0cb7d76b
......@@ -160,6 +160,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,LIBLANGTAG,LANGTAGREG_TARBALL) \
$(call fetch_Optional,LIBLANGTAG,LIBLANGTAG_TARBALL) \
$(call fetch_Optional,LIBPNG,PNG_TARBALL) \
$(call fetch_Optional,LIBTOMMATH,LIBTOMMATH_TARBALL) \
$(call fetch_Optional,LIBXML2,LIBXML_TARBALL) \
LIBXMLSEC_TARBALL \
$(call fetch_Optional,LIBXSLT,LIBXSLT_TARBALL) \
......
......@@ -2901,6 +2901,36 @@ endef
endif # SYSTEM_OPENLDAP
ifneq ($(SYSTEM_LIBTOMMATH),)
define gb_LinkTarget__use_libtommath
$(call gb_LinkTarget_set_include,$(1),\
$(LIBTOMMATH_CFLAGS) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
endef
else # !SYSTEM_LIBTOMMATH
define gb_LinkTarget__use_libtommath
$(call gb_LinkTarget_set_include,$(1),\
-I${WORKDIR}/UnpackedTarball/libtommath \
$$(INCLUDE) \
)
$(call gb_LinkTarget_add_libs,$(1),\
$(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
)
$(call gb_LinkTarget_use_external_project,$(1),libtommath)
endef
endif # SYSTEM_LIBTOMMATH
define gb_ExternalProject__use_libtommath
$(call gb_ExternalProject_use_external_project,$(1),libtommath)
endef
ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
......@@ -2915,38 +2945,29 @@ $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
endef
# gb_LinkTarget__use_atomic_ops :=
# gb_LinkTarget__use_tommath :=
else # !SYSTEM_FIREBIRD
#$(call gb_LinkTarget__use_libatomic_ops,$(1))
#$(call gb_LinkTarget__use_libtommath,$(1))
define gb_LinkTarget__use_libfbembed
$(call gb_LinkTarget_use_package,$(1),firebird)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,firebird)/gen/Release/firebird/include \
$$(INCLUDE) \
-I$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/include \
)
ifeq ($(COM),MSC)
$(call gb_LinkTarget_add_libs,$(1),\
$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/bin/ifbembed.lib \
$(call gb_UnpackedTarball_get_dir,firebird)/gen/Release/firebird/bin/ifbclient.lib \
)
else
$(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,firebird)/gen/firebird/lib -lfbembed \
-L$(call gb_UnpackedTarball_get_dir,firebird)/gen/Release/firebird/lib -lfbclient \
)
endif
endef
# define gb_LinkTarget__use_tommath
# $(call gb_LinkTarget_set_include,$(1),\
# $(TOMMATH_CFLAGS) \
# $$(INCLUDE) \
# )
# $(call gb_LinkTarget_add_libs,$(1),$(TOMMATH_LIBS))
# endef
......@@ -2956,7 +2977,7 @@ else # !ENABLE_FIREBIRD_SDBC
gb_LinkTarget__use_firebird :=
# gb_LinkTarget__use_atomic_ops :=
# gb_LinkTarget__use_tommath :=
# gb_LinkTarget__use_libtommath :=
endif # ENABLE_FIREBIRD_SDBC
......
......@@ -1776,6 +1776,11 @@ AC_ARG_WITH(system-firebird,
driver. If fb_config is not in PATH, use FBCONFIG to point to it.]),,
[with_system_firebird="$with_system_libs"])
AC_ARG_WITH(system-libtommath,
AS_HELP_STRING([--with-system-libtommath],
[Use libtommath already on system]),,
[with_system_libtommath="$with_system_libs"])
AC_ARG_WITH(system-hsqldb,
AS_HELP_STRING([--with-system-hsqldb],
[Use hsqldb already on system.]))
......@@ -8803,6 +8808,8 @@ int fb_api_is_30(void) { return 0; }
elif test "$cross_compiling" = "yes"; then
AC_MSG_RESULT([none])
else
dnl Embedded Firebird has version 3.0
AC_DEFINE(HAVE_FIREBIRD_30, 1)
dnl We need libatomic-ops for any non X86/X64 system
if test "${CPUNAME}" != INTEL -a "${CPUNAME}" != X86_64; then
dnl ===================================================================
......@@ -8823,8 +8830,22 @@ int fb_api_is_30(void) { return 0; }
AC_MSG_RESULT([internal])
SYSTEM_FIREBIRD=
FIREBIRD_CFLAGS="-I${WORKDIR}/UnpackedTarball/firebird/include"
FIREBIRD_LIBS="-lfbembed"
FIREBIRD_CFLAGS="-I${WORKDIR}/UnpackedTarball/firebird/gen/Release/firebird/include"
FIREBIRD_LIBS="-lfbclient"
if test "$with_system_libtommath" = "yes"; then
SYSTEM_LIBTOMMATH=TRUE
dnl check for tommath presence
save_LIBS=$LIBS
AC_CHECK_HEADER(tommath.h,,AC_MSG_ERROR(Include file for tommath not found - please install development tommath package))
AC_CHECK_LIB(tommath, mp_init, TOMMATH_LIBS=-ltommath, AC_MSG_ERROR(Library tommath not found - please install development tommath package))
LIBS=$save_LIBS
else
SYSTEM_LIBTOMMATH=
LIBTOMMATH_CFLAGS="-I${WORKDIR}/UnpackedTarball/libtommath"
LIBTOMMATH_LIBS="-ltommath"
BUILD_TYPE="$BUILD_TYPE LIBTOMMATH"
fi
BUILD_TYPE="$BUILD_TYPE FIREBIRD"
ENABLE_FIREBIRD_SDBC="TRUE"
......@@ -8838,8 +8859,8 @@ AC_SUBST(SYSTEM_FIREBIRD)
AC_SUBST(FIREBIRD_CFLAGS)
AC_SUBST(FIREBIRD_LIBS)
AC_SUBST(HAVE_FIREBIRD_30)
dnl AC_SUBST([TOMMATH_CFLAGS])
dnl AC_SUBST([TOMMATH_LIBS])
AC_SUBST([TOMMATH_CFLAGS])
AC_SUBST([TOMMATH_LIBS])
dnl ===================================================================
dnl Check for system curl
......
......@@ -62,6 +62,9 @@ namespace {
const char our_sFirebirdTmpVar[] = "FIREBIRD_TMP";
const char our_sFirebirdLockVar[] = "FIREBIRD_LOCK";
const char our_sFirebirdMsgVar[] = "FIREBIRD_MSG";
#ifdef MACOSX
const char our_sFirebirdLibVar[] = "LIBREOFFICE_FIREBIRD_LIB";
#endif
};
FirebirdDriver::FirebirdDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext)
......@@ -94,7 +97,16 @@ FirebirdDriver::FirebirdDriver(const css::uno::Reference< css::uno::XComponentCo
OUString sMsgPath;
::osl::FileBase::getSystemPathFromFileURL(sMsgURL, sMsgPath);
osl_setEnvironment(OUString(our_sFirebirdMsgVar).pData, sMsgPath.pData);
#endif
#ifdef MACOSX
// Set an env. variable to specify library location
// for dlopen used in fbclient.
OUString sLibURL("$LO_LIB_DIR");
::rtl::Bootstrap::expandMacros(sLibURL);
OUString sLibPath;
::osl::FileBase::getSystemPathFromFileURL(sLibURL, sLibPath);
osl_setEnvironment(OUString(our_sFirebirdLibVar).pData, sLibPath.pData);
#endif /*MACOSX*/
#endif /*!SYSTEM_FIREBIRD*/
}
FirebirdDriver::~FirebirdDriver()
......@@ -120,7 +132,10 @@ void FirebirdDriver::disposing()
#ifndef SYSTEM_FIREBIRD
osl_clearEnvironment(OUString(our_sFirebirdMsgVar).pData);
#endif
#ifdef MACOSX
osl_clearEnvironment(OUString(our_sFirebirdLibVar).pData);
#endif /*MACOSX*/
#endif /*!SYSTEM_FIREBIRD*/
OSL_VERIFY(fb_shutdown(0, 1));
......
......@@ -39,6 +39,8 @@ export FIREBIRD_MD5SUM := b0b5293991fcf07347b38431c80be1d4
export FIREBIRD_TARBALL := Firebird-2.5.5.26952-0.tar.bz2
# FIREBIRD_MD5SUM := b259c2d1c60a03bd104108405ae990a7
# export FIREBIRD_TARBALL := Firebird-3.0-alpha1-20130302.tar.gz
export FIREBIRD_MD5SUM := 821260b61dafc22899d1464d4e91ee6a
export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
export FONTCONFIG_TARBALL := 77e15a92006ddc2adbb06f840d591c0e-fontconfig-2.8.0.tar.gz
export FONT_CALADEA_TARBALL := 368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz
export FONT_CARLITO_TARBALL := c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz
......@@ -94,6 +96,8 @@ export LIBGLTF_MD5SUM := d63a9f47ab048f5009d90693d6aa6424
export LIBGLTF_TARBALL := libgltf-0.0.2.tar.bz2
export LIBLANGTAG_TARBALL := aa899eff126216dafe721149fbdb511b-liblangtag-0.5.8.tar.bz2
export LIBXMLSEC_TARBALL := 0fb1bb06d60d7708abc4797008209bcc-xmlsec1-1.2.22.tar.gz
export LIBTOMMATH_MD5SUM := da283d2e3e72137d0c600ac36b991c9d
export LIBTOMMATH_TARBALL := ltm-1.0.zip
export LIBXML_TARBALL := ae249165c173b1ff386ee8ad676815f5-libxml2-2.9.4.tar.gz
export LIBXSLT_TARBALL := a129d3c44c022de3b9dcf6d6f288d72e-libxslt-1.1.29.tar.gz
export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
......
......@@ -68,6 +68,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,LIBXML2,libxml2) \
$(call gb_Helper_optional,LIBXSLT,libxslt) \
$(call gb_Helper_optional,LPSOLVE,lpsolve) \
$(call gb_Helper_optional,LIBTOMMATH,libtommath) \
$(call gb_Helper_optional,MARIADB,libmariadb) \
$(call gb_Helper_optional,MDDS,mdds) \
$(call gb_Helper_optional,MDNSRESPONDER,mdnsresponder) \
......
......@@ -12,13 +12,16 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,firebird,firebird))
$(eval $(call gb_ExternalPackage_use_external_project,firebird,firebird))
ifeq ($(OS)-$(COM),WNT-MSC)
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/ifbembed.dll,gen/firebird/bin/ifbembed.dll))
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/ifbclient.dll,gen/Release/firebird/bin/ifbclient.dll))
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/Engine12.dll,gen/Release/firebird/plugins/Engine12.dll))
else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbembed.dylib,gen/firebird/lib/libfbembed.dylib.2.5.5))
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.dylib.3.0.0,gen/Release/firebird/lib/libfbclient.dylib.3.0.0))
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libEngine12.dylib,gen/Release/firebird/plugins/libEngine12.dylib))
else ifeq ($(DISABLE_DYNLOADING),)
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbembed.so.2.5,gen/firebird/lib/libfbembed.so.2.5.5))
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.so.2,gen/Release/firebird/lib/libfbclient.so.3.0.0))
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libEngine12.so,gen/Release/firebird/plugins/libEngine12.so))
endif
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_SHARE_FOLDER)/firebird/firebird.msg,gen/firebird/firebird.msg))
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_SHARE_FOLDER)/firebird/firebird.msg,gen/Release/firebird/firebird.msg))
# vim: set noet sw=4 ts=4:
......@@ -15,15 +15,13 @@ $(eval $(call gb_ExternalProject_use_externals,firebird,\
boost_headers \
icu \
libatomic_ops \
libtommath \
))
$(eval $(call gb_ExternalProject_register_targets,firebird,\
build \
))
# note: this can intentionally only build against internal atomic_op
# note: this can intentionally only build against internal tommath
ifneq ($(OS),WNT)
INVOKE_FPA:="CPU=\$$(EMPTY) $${FB_CPU_ARG}"
endif
......@@ -34,7 +32,8 @@ MAKE_PRE=$(if $(filter WNT,$(OS)),\
MAKE_POST=$(if $(filter MACOSX,$(OS)),&& $(PERL) \
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
$(gb_Package_SOURCEDIR_firebird)/gen/firebird/lib/libfbembed.dylib.2.5.5)
$(gb_Package_SOURCEDIR_firebird)/gen/Release/firebird/plugins/libEngine12.dylib \
$(gb_Package_SOURCEDIR_firebird)/gen/Release/firebird/lib/libfbclient.dylib.3.0.0)
# do not set LDFLAGS - it is mysteriously not used by firebird on MacOSX
$(call gb_ExternalProject_get_state_target,firebird,build):
......@@ -46,23 +45,41 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
$(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_CFLAGS), \
-I$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src \
) \
$(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_CFLAGS), \
-I$(call gb_UnpackedTarball_get_dir,libtommath) \
-L$(call gb_UnpackedTarball_get_dir,libtommath) \
) \
$(if $(filter WNT MACOSX,$(OS)), \
$(if $(SYSTEM_ICU),$(ICU_CPPFLAGS), \
-I$(call gb_UnpackedTarball_get_dir,icu)/source \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
-L$(call gb_UnpackedTarball_get_dir,icu)/source/lib \
)) \
" \
&& export CXXFLAGS=" \
$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS), \
$(BOOST_CPPFLAGS) \
-L$(call gb_UnpackedTarball_get_dir,boost)/source/lib \
) \
$(if $(SYSTEM_ICU),$(ICU_CPPFLAGS), \
-I$(call gb_UnpackedTarball_get_dir,icu)/source \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
-L$(call gb_UnpackedTarball_get_dir,icu)/source/lib \
$(if $(filter-out WNT MACOSX,$(OS)), \
$(if $(SYSTEM_ICU),$(ICU_CPPFLAGS), \
-I$(call gb_UnpackedTarball_get_dir,icu)/source \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
-L$(call gb_UnpackedTarball_get_dir,icu)/source/lib \
)) \
$(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_CFLAGS), \
-L$(call gb_UnpackedTarball_get_dir,libtommath) \
) \
" \
" \
$(if $(filter MACOSX,$(OS)), \
&& export DYLD_LIBRARY_PATH="$(call gb_UnpackedTarball_get_dir,icu)/source/lib" \
)\
&& MAKE=$(MAKE) ./configure \
--without-editline \
--disable-superserver \
--with-system-icu --without-fbsample --without-fbsample-db \
--without-fbsample --without-fbsample-db \
--with-wire-compress=no \
$(if $(filter-out MSC,$(COM)),$(if $(ENABLE_DEBUG),--enable-debug)) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(DISABLE_DYNLOADING), \
......@@ -71,9 +88,9 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
--enable-shared --disable-static \
) \
&& if [ -n "$${FB_CPU_ARG}" ]; then \
$(MAKE_PRE) $(MAKE) $(INVOKE_FPA) SHELL='$(SHELL)' firebird_embedded $(MAKE_POST); \
$(MAKE_PRE) $(MAKE) $(INVOKE_FPA) SHELL='$(SHELL)' $(MAKE_POST); \
else \
$(MAKE_PRE) $(MAKE) SHELL='$(SHELL)' firebird_embedded $(MAKE_POST); \
$(MAKE_PRE) $(MAKE) SHELL='$(SHELL)' $(MAKE_POST); \
fi \
)
# vim: set noet sw=4 ts=4:
......@@ -14,23 +14,22 @@ $(eval $(call gb_UnpackedTarball_set_tarball,firebird,$(FIREBIRD_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,firebird,0))
$(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/firebird-rpath.patch.0 \
external/firebird/firebird-c++11.patch.1 \
external/firebird/firebird.disable-ib-util-not-found.patch.1 \
external/firebird/firebird-c++14.patch \
external/firebird/firebird-Engine12.patch \
external/firebird/firebird-rpath.patch.0 \
))
ifeq ($(OS)-$(COM),WNT-MSC)
$(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/firebird-cygwin-msvc.patch.1 \
external/firebird/firebird-cygwin-msvc.patch \
))
endif
ifeq ($(OS),MACOSX)
$(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/firebird-macosx.patch.1 \
external/firebird/firebird-configure-x86-64-macosx.patch.1 \
external/firebird/macosx-elcapitan-dyld.patch \
external/firebird/firebird-macosx.patch.1 \
))
endif
# vim: set noet sw=4 ts=4:
--- src/common/utils.cpp
+++ src/common/utils.cpp
@@ -1026,6 +1026,13 @@
PathUtils::concatPath(s, configDir[prefType], name);
return s;
}
+
+ // Set relative path to Engine12 dynamic library
+ if(prefType == Firebird::IConfigManager::DIR_PLUGINS)
+ {
+ s = name;
+ return s;
+ }
}
switch(prefType)
# -*- Mode: Diff -*-
--- firebird/src/dudley/exe.epp
+++ firebird/src/dudley/exe.epp
@@ -2884,9 +2884,9 @@
blr_parameter, 0, 0, 0,
blr_parameter, 0, 1, 0,
blr_parameter, 1, 0, 0,
- blr_end,
- blr_end,
- blr_end,
+ SCHAR(blr_end),
+ SCHAR(blr_end),
+ SCHAR(blr_end),
blr_eoc
};
static FB_API_HANDLE req_handle;
--- firebird/src/gpre/sqe.cpp
+++ firebird/src/gpre/sqe.cpp
@@ -2529,7 +2529,7 @@
return par_stat(request);
if (MSC_match(KW_MINUS))
- return MSC_unary(nod_negate, par_primitive_value(request, false, paren_count, false));
+ return MSC_unary(nod_negate, par_primitive_value(request, false, paren_count, NULL));
MSC_match(KW_PLUS);
--- src/common/classes/alloc.cpp
+++ src/common/classes/alloc.cpp
@@ -2121,3 +2121,11 @@
{
Firebird::MemoryPool::globalFree(mem);
}
+void operator delete(void* mem, size_t) throw()
+{
+ Firebird::MemoryPool::globalFree(mem);
+}
+void operator delete[](void* mem, size_t) throw()
+{
+ Firebird::MemoryPool::globalFree(mem);
+}
--- src/common/classes/alloc.h
+++ src/common/classes/alloc.h
@@ -491,13 +491,6 @@
inline static MemoryPool* getDefaultMemoryPool() { return Firebird::MemoryPool::processMemoryPool; }
-// Global versions of operators new and delete
-void* operator new(size_t s) THROW_BAD_ALLOC;
-void* operator new[](size_t s) THROW_BAD_ALLOC;
-
-void operator delete(void* mem) throw();
-void operator delete[](void* mem) throw();
-
#ifdef DEBUG_GDS_ALLOC
inline void* operator new(size_t s, Firebird::MemoryPool& pool, const char* file, int line)
{
--- firebird.org/configure 2015-03-27 16:00:42.000000000 +0200
+++ firebird/configure 2015-06-09 15:33:26.000000000 +0300
@@ -2373,7 +2373,7 @@
+++ firebird/configure 2015-06-09 15:33:26.000000000 +0300
@@ -2903,7 +2903,7 @@
;;
i*86-*-darwin* | i*86_*-darwin*)
i*86-*-darwin*)
- MAKEFILE_PREFIX=darwin_i386
+ MAKEFILE_PREFIX=darwin_x86_64
MAKEFILE_POSTFIX=darwin
PLATFORM=DARWIN
INSTALL_PREFIX=darwin
@@ -2386,7 +2386,7 @@
@@ -2913,7 +2913,7 @@
LIBS="$LIBS -framework CoreFoundation"
EDITLINE_FLG=Y
SHRLIB_EXT=dylib
ICU_PLATFORM=MacOSX
- CPU_TYPE=i386
+ CPU_TYPE=x86_64
EXPORT_SYMBOLS_STYLE=darwin
;;
powerpc-*-darwin*)
This diff is collapsed.
# -*- Mode: Diff -*-
--- firebird.org/builds/posix/darwin.defaults
+++ firebird/builds/posix/darwin.defaults
@@ -32,17 +32,17 @@
LINK_EMPTY_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/empty.darwin.vers
LINK_FIREBIRD_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.darwin.vers
-LIB_LINK_RPATH:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Libraries/
-LIB_EMBED_LINK_OPTIONS:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Firebird
-LIB_CLIENT_LINK_OPTIONS:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Firebird
-FBEMBED_LINK:=-F../gen/firebird -framework Firebird -L$(LIB) -lfbembed $(ICU_LIBS)
+LIB_LINK_RPATH:=
+LIB_EMBED_LINK_OPTIONS:=-install_name @__________________________________________________OOO/libfbembed.dylib
+LIB_CLIENT_LINK_OPTIONS:=
+FBEMBED_LINK:=-L$(LIB) -lfbembed $(ICU_LIBS)
PLATFORM_FALLBACK=os/posix
-PLAT_CLASSIC_PRE_TARGET=darwin_setup_framework
-PLAT_CLASSIC_POST_TARGET=darwin_finish_cs_framework
+PLAT_CLASSIC_PRE_TARGET=
+PLAT_CLASSIC_POST_TARGET=
-PLAT_SUPER_PRE_TARGET=darwin_setup_framework
-PLAT_SUPER_POST_TARGET=darwin_finish_ss_framework
+PLAT_SUPER_PRE_TARGET=
+PLAT_SUPER_POST_TRAGET=
PLATFORM_POSTBUILD_TARGET=darwin_postbuild_target
diff -ur firebird.org/builds/posix/postfix.darwin firebird/builds/posix/postfix.darwin
--- firebird.org/builds/posix/postfix.darwin 2013-07-12 20:55:46.000000000 +0200
+++ firebird/builds/posix/postfix.darwin 2013-07-15 12:07:36.000000000 +0200
--- firebird.org/extern/cloop/src/tests/test1/CTest.c 2016-08-01 22:55:35.000000000 +0200
+++ firebird/extern/cloop/src/tests/test1/CTest.c 2016-08-02 21:11:31.000000000 +0200
@@ -20,7 +20,7 @@
*/
#include "CalcCApi.h"
-#include <malloc.h>
+#include <stdlib.h>
#include <stdio.h>
#ifdef WIN32
--- firebird.org/builds/posix/prefix.darwin_x86_64 2016-08-01 20:02:48.000000000 +0200
+++ firebird/builds/posix/prefix.darwin_x86_64 2016-08-01 21:42:45.000000000 +0200
@@ -19,7 +19,7 @@
#
# Default build from 10.7 using Clang
-DYLD_LIBRARY_PATH=$(HOME)/icu54/icu/source/lib
+DYLD_LIBRARY_PATH:=$(HOME)/icu54/icu/source/lib:$(DYLD_LIBRARY_PATH)
export DYLD_LIBRARY_PATH
#DYLD_PRINT_ENV=1
@@ -31,15 +31,15 @@
MACOSX_DEPLOYMENT_TARGET=10.7
export MACOSX_DEPLOYMENT_TARGET
-PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common -mmacosx-version-min=10.7
-DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -mmacosx-version-min=10.7 -Wno-non-virtual-dtor
+PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common
+DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -Wno-non-virtual-dtor
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden
EXE_LINK_OPTIONS:=
UNDEF_PLATFORM=
LINK_LIBS+=-liconv
-MATHLIB=/opt/local/lib/libtommath.a
+MATHLIB=-ltommath
SO_LINK_LIBS+=-liconv
include $(ROOT)/gen/darwin.defaults
--- firebird.org/builds/posix/postfix.darwin 2016-08-01 20:02:48.000000000 +0200
+++ firebird/builds/posix/postfix.darwin 2016-08-01 22:17:49.000000000 +0200
@@ -54,9 +54,9 @@
cp -r ../gen/firebird/include $(FB_FW)/Versions/A/Headers
cp ../gen/firebird/lib/libfbembed.dylib $(FB_FW)/Versions/A/Firebird
......@@ -37,9 +48,9 @@ diff -ur firebird.org/builds/posix/postfix.darwin firebird/builds/posix/postfix.
- cp ../gen/firebird/lib/libicudata.dylib $(FB_FW)/Versions/A/Libraries/libicudata.dylib
- cp ../gen/firebird/lib/libicui18n.dylib $(FB_FW)/Versions/A/Libraries/libicui18n.dylib
- cp ../gen/firebird/lib/libicuuc.dylib $(FB_FW)/Versions/A/Libraries/libicuuc.dylib
+ #cp ../gen/firebird/lib/libicudata.dylib $(FB_FW)/Versions/A/Libraries/libicudata.dylib
+ #cp ../gen/firebird/lib/libicui18n.dylib $(FB_FW)/Versions/A/Libraries/libicui18n.dylib
+ #cp ../gen/firebird/lib/libicuuc.dylib $(FB_FW)/Versions/A/Libraries/libicuuc.dylib
+# cp ../gen/firebird/lib/libicudata.dylib $(FB_FW)/Versions/A/Libraries/libicudata.dylib
+# cp ../gen/firebird/lib/libicui18n.dylib $(FB_FW)/Versions/A/Libraries/libicui18n.dylib
+# cp ../gen/firebird/lib/libicuuc.dylib $(FB_FW)/Versions/A/Libraries/libicuuc.dylib
cp ../gen/firebird/lib/libib_util.dylib $(FB_FW)/Versions/A/Libraries/libib_util.dylib
cp ../gen/firebird/firebird.msg \
$(FB_FW)/Resources/English.lproj/var/firebird.msg
......@@ -54,48 +65,84 @@ diff -ur firebird.org/builds/posix/postfix.darwin firebird/builds/posix/postfix.
cp -r ../gen/firebird/help $(FB_FW)/Resources/English.lproj/var/help
cp ../gen/firebird/security2.fdb $(FB_FW)/Resources/English.lproj/var
mkdir -p $(FB_FW)/Resources/doc
--- firebird.org/builds/posix/prefix.darwin_i386
+++ firebird/builds/posix/prefix.darwin_i386
@@ -24,7 +24,7 @@
--- firebird.org/builds/posix/prefix.darwin_i386 2016-08-01 22:55:34.000000000 +0200
+++ firebird/builds/posix/prefix.darwin_i386 2016-08-01 23:02:46.000000000 +0200
@@ -26,14 +26,14 @@
# 4. for CFLAGS, CXXFLAGS, LDFLAGS export '-m32 -arch i386'
# 5. export MACOSX_DEPLOYMENT_TARGET=10.7
# 5. export MACOSX_DEPLOYMENT_TARGET=10.7
-DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
+DYLD_LIBRARY_PATH:=$(FIREBIRD)/lib:$(DYLD_LIBRARY_PATH)
export DYLD_LIBRARY_PATH
MACOSX_DEPLOYMENT_TARGET=10.7
@@ -34,8 +34,8 @@
OS_ServerFiles=inet_server.cpp
-PROD_FLAGS=-O1 -DDARWIN -pipe -p -MMD -fPIC -fno-common -arch i386 -mmacosx-version-min=10.7
-DEV_FLAGS=-ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -arch i386 -mmacosx-version-min=10.7
+PROD_FLAGS=-O1 -DDARWIN -pipe -p -MMD -fPIC -fno-common -arch i386
+DEV_FLAGS=-ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -arch i386
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden
EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr
CLIENT_UTIL_TARGETS=gstat gsec fbguard fbmgr_bin nbackup fb_lock_print fbsvcmgr fbtracemgr
--- firebird.org/builds/posix/prefix.darwin_x86_64
+++ firebird/builds/posix/prefix.darwin_x86_64
@@ -19,7 +19,7 @@
#
# Default build from 10.7 using Clang
export MACOSX_DEPLOYMENT_TARGET
-DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
+DYLD_LIBRARY_PATH:=$(FIREBIRD)/lib:$(DYLD_LIBRARY_PATH)
export DYLD_LIBRARY_PATH
-PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common -arch i386 -mmacosx-version-min=10.7
-DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-common -Wall -arch i386 -mmacosx-version-min=10.7 -Wno-non-virtual-dtor
+PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common -arch i386
+DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-common -Wall -arch i386 -Wno-non-virtual-dtor
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -fno-weak
MACOSX_DEPLOYMENT_TARGET=10.7
@@ -27,8 +27,8 @@
EXE_LINK_OPTIONS:=-m32
--- firebird.org/builds/posix/Makefile.in 2016-08-08 17:58:20.000000000 +0200
+++ firebird/builds/posix/Makefile.in 2016-08-08 17:57:17.000000000 +0200
@@ -191,6 +191,9 @@
$(MAKE) plugins
$(MAKE) examples
$(MAKE) rest
+ install_name_tool -id @__________________________________________________OOO/libfbclient.dylib.3.0.0 $(LIB)/libfbclient.dylib
+ install_name_tool -id @__________________________________________________OOO/libEngine12.dylib $(PLUGINS)/libEngine12.dylib
+ install_name_tool -change $(LIB)/libfbclient.dylib.3.0.0 @loader_path/libfbclient.dylib.3.0.0 $(PLUGINS)/libEngine12.dylib
OS_ServerFiles=inet_server.cpp
-PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common -mmacosx-version-min=10.7
-DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-common -Wall -mmacosx-version-min=10.7
+PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common
+DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-common -Wall
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden
EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr
CLIENT_UTIL_TARGETS=gstat gsec fbguard fbmgr_bin nbackup fb_lock_print fbsvcmgr fbtracemgr
cross_process:
--- firebird.org/src/common/unicode_util.cpp 2016-07-07 13:55:55.992234709 +0200
+++ firebird/src/common/unicode_util.cpp 2016-08-10 11:25:46.422331020 +0200
@@ -63,8 +63,8 @@
#elif defined(DARWIN)
//const char* const inTemplate = "/Library/Frameworks/Firebird.framework/Versions/A/Libraries/libicui18n.dylib";
//const char* const ucTemplate = "/Library/Frameworks/Firebird.framework/versions/A/Libraries/libicuuc.dylib";
-const char* const inTemplate = "libicui18n.dylib";
-const char* const ucTemplate = "libicuuc.dylib";
+const char* const inTemplate = "libicui18n.dylib.%s";
+const char* const ucTemplate = "libicuuc.dylib.%s";
#elif defined(HPUX)
const char* const inTemplate = "libicui18n.sl.%s";
const char* const ucTemplate = "libicuuc.sl.%s";
@@ -353,6 +353,12 @@
s.printf("%d%d", majorVersion, minorVersion);
filename.printf(templateName, s.c_str());
+ const char * const envpath = getenv("LIBREOFFICE_FIREBIRD_LIB");
+ if(envpath != nullptr)
+ {
+ s = filename.c_str();
+ PathUtils::concatPath(filename, envpath, s.c_str());
+ }
}
--- firebird.org/src/common/utils.cpp 2016-08-16 10:11:10.000000000 +0200
+++ firebird/src/common/utils.cpp 2016-08-16 11:27:09.000000000 +0200
@@ -1027,10 +1027,18 @@
return s;
}
- // Set relative path to Engine12 dynamic library
+ // Set path to Engine12 dynamic library.
if(prefType == Firebird::IConfigManager::DIR_PLUGINS)
{
- s = name;
+ const char * const envpath = getenv("LIBREOFFICE_FIREBIRD_LIB");
+ if(envpath != nullptr)
+ {
+ PathUtils::concatPath(s, envpath, name);
+ }
+ else
+ {
+ s = name;
+ }
return s;
}
}
--- builds/posix/make.defaults
+++ builds/posix/make.defaults
@@ -255,7 +255,7 @@
@@ -279,7 +279,7 @@
LIB_PLATFORM_RPATH = -Wl,-rpath,$(1)
ifeq ($(strip @BINRELOC_CFLAGS@),)
-LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),@FB_LIBDIR@,@FB_INTLDIR@))
+LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$ORIGIN')
else
LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$$$ORIGIN/../$(1)')
endif
ifeq (@USE_RPATH@,1)
ifeq ($(strip @BINRELOC_CFLAGS@),)
- LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),@FB_LIBDIR@,@FB_INTLDIR@))
+ LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$ORIGIN')
else
LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$ORIGIN/../$(1)')
endif
--- firebird.org/src/jrd/fun.epp 2015-01-23 22:11:26.751475044 +0100
+++ firebird/src/jrd/fun.epp 2015-01-23 22:16:42.507322568 +0100
@@ -160,10 +160,14 @@
@@ -164,10 +164,14 @@
if (tryLibrary(LIBNAME, message[3]))
return;
+ /* fdo#72543: quote from https://bugs.freedesktop.org/show_bug.cgi?id=72543#c8
+ "we don't need UDF support for embedded firebird,
+ hence the lack of ib_util isn't an issue and can safely be ignored"
+ hence the lack of ib_util isn't an issue and can safely be ignored"
// all failed - log error
gds__log("ib_util init failed, UDFs can't be used - looks like firebird misconfigured\n"
"\t%s\n\t%s\n\t%s\n\t%s", message[0].c_str(), message[1].c_str(),
message[2].c_str(), message[3].c_str());
+ */
#endif // !BOOT_BUILD
}
Seulement dans firebird/src/misc: codes.cpp
Seulement dans firebird: temp
void* IbUtil::alloc(long size)
# -*- 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,libtommath))
$(eval $(call gb_ExternalProject_register_targets,libtommath,\
build \
))
$(eval $(call gb_ExternalProject_use_nmake,libtommath,build))
ifeq ($(COM),MSC)
$(call gb_ExternalProject_get_state_target,libtommath,build):
$(call gb_ExternalProject_run,build,\
export CC="$(shell cygpath -w $(filter-out -%,$(CC))) $(filter -%,$(CC))" \
&& export LIB="$(ILIB)" \
&& nmake -nologo -f makefile.msvc \
)
else
$(call gb_ExternalProject_get_state_target,libtommath,build) :
$(call gb_ExternalProject_run,build,\
unset MAKEFLAGS \
&& export CFLAGS=" \
-fPIC \
" \
&& $(MAKE) \
)
endif
# vim: set noet sw=4 ts=4:
# -*- 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:
# -*- 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,libtommath))
$(eval $(call gb_Module_add_targets,libtommath,\
ExternalProject_libtommath \
UnpackedTarball_libtommath \
))
# vim: set noet sw=4 ts=4:
LibTomMath is a free open source portable number theoretic multiple-precision
integer library written entirely in C.
Used by embedded firebird (external/firebird).
http://www.libtom.org/LibTomMath/
# -*- 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,libtommath))
$(eval $(call gb_UnpackedTarball_set_tarball,libtommath,$(LIBTOMMATH_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libtommath,0))
$(eval $(call gb_UnpackedTarball_add_patches,libtommath,\
external/libtommath/libtommath-msvc.patch \
))
# vim: set noet sw=4 ts=4:
--- makefile.msvc 2016-02-05 23:25:32.000000000 +0100
+++ makefile.msvc 2016-07-21 11:34:20.618390100 +0200
@@ -38,3 +38,9 @@
library: $(OBJECTS)
lib /out:tommath.lib $(OBJECTS)
+
+.cc.obj:
+ $(CC) /nologo $(CFLAGS) /c $<
+
+.c.obj:
+ $(CC) /nologo $(CFLAGS) /c $<
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment