office-gobmx/external/firebird/firebird-macosx.patch.1
Julien Nabet 86744f0399 firebird: update to 3.0.7
This tries to get rid of a lot of cruft from older builds and it
also aims to build as much as possible on Windows.

The firebird-cygwin-msvc-warnings.patch should be optional. It
gets rid of various compiler warnings on Windows, either by
disableing or fixing them:
- fix: D9002 - ignoring unknown option '-fno-rtti'
- fix: D9024 - unrecognized source file type <filename>, object
  file assumed
- ign: C4291 - <declaration>: no matching operator delete found;
  memory will not be freed if initialization throws an exception
- ign: C4477 - <function>: format string <string> requires an
  argument of type <type>, but variadic argument number has
  type <type>

And I explicitly got rid of the "win32" handling and simply use
arch depending patches on Windows, which strips additional stuff.

sberg adds:  I have no idea how in an upstream macOS build the empbuild
executible in gen/examples should now find @rpath/lib/libfbclient.dylib, as it
does not have an RPATH set.  So add an appropriate one in
external/firebird/firebird-macosx.patch.1's patch of
builds/posix/Makefile.in.examples (which needs to know whether we do a Debug or
a Release build; an attempt of using firebird's $(IsDeveloper) for that caused
other failures, see bca0dc97bf "Revert
'external/firebird: Pass --enable-developer into configure'", so use LO's
$(ENABLE_DEBUG) and rely on that being exported from LO's make into firebird's
make).  Also, the fbclient and Engine12 dylibs now have RPATHs set which we do
not need in LO (where we still stick to our general use of @loader_path), so
drop them in external/firebird/ExternalProject_firebird.mk (even though leaving
them in should be harmless).

Change-Id: Id34bb88900d15f89adda03e34af2ac3d4f6aa085
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105440
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-26 15:06:59 +01:00

87 lines
3.5 KiB
Groff

--- firebird.org/builds/posix/Makefile.in.examples
+++ firebird/builds/posix/Makefile.in.examples
@@ -134,7 +134,7 @@
$(LN) $(ISQL) $(EXAMPLES_DEST)/isql$(EXEC_EXT)
$(EXAMPLES_DEST)/empbuild$(EXEC_EXT): $(EMPBLD_Objects) $(COMMON_LIB)
- $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
+ $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,../$(if $(ENABLE_DEBUG),Debug,Release)/firebird)
$(EXAMPLES_DEST)/empbuild.c: $(EXAMPLES_DEST)/empbuild.fdb $(EXAMPLES_DEST)/empbuild.e
--- 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
@@ -27,9 +27,6 @@
# configure using --with-builtin-tommath
# or add the relevant -I, -L for an installed version of libtommath
-DYLD_LIBRARY_PATH=$(HOME)/icu54/icu/source/lib
-export DYLD_LIBRARY_PATH
-
#DYLD_PRINT_ENV=1
#export DYLD_PRINT_ENV
@@ -31,8 +31,8 @@
MACOSX_DEPLOYMENT_TARGET=10.9
export MACOSX_DEPLOYMENT_TARGET
-PROD_FLAGS=-DDARWIN -pipe -O2 -MMD -fPIC -fno-common -mmacosx-version-min=10.9
-DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -mmacosx-version-min=10.9 -Wno-non-virtual-dtor
+PROD_FLAGS=-DDARWIN -pipe -O2 -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 -stdlib=libc++ -msse4
EXE_LINK_OPTIONS:=
--- 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 @@
const char* const ucTemplate = "icuuc%s.dll";
#endif
#elif defined(DARWIN)
-const char* const inTemplate = "lib/libicui18n.%s.dylib";
-const char* const ucTemplate = "lib/libicuuc.%s.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";
@@ -354,6 +354,16 @@
{
s.printf(*p, majorVersion, minorVersion);
filename.printf(templateName, s.c_str());
+ const char * envpath = getenv("LIBREOFFICE_FIREBIRD_LIB");
+ if(envpath == nullptr)
+ {
+ envpath = getenv("LIBREOFFICE_ICU_LIB");
+ }
+ if(envpath != nullptr)
+ {
+ s = filename.c_str();
+ PathUtils::concatPath(filename, envpath, s.c_str());
+ }
ModuleLoader::Module* module = ModuleLoader::fixAndLoadModule(NULL, filename);
if (module)
--- 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;
}
}