Accepting request 681672 from home:rmax:branches:LibreOffice:Factory

- libreoffice-postgresql.patch: pg_config is meant for linking
  server extensions, clients should use pkg-config instead to build
  against libpq. This fixes build with PostgreSQL 11.

OBS-URL: https://build.opensuse.org/request/show/681672
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=760
This commit is contained in:
Tomáš Chvátal 2019-03-05 10:35:06 +00:00 committed by Git OBS Bridge
parent d6a0e2e50d
commit 1302655a9c
3 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,24 @@
--- configure.ac.orig
+++ configure.ac
@@ -8669,11 +8669,17 @@ if test "x$enable_postgresql_sdbc" != "x
done
fi
AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
- if test -z "$PGCONFIG"; then
- AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
+ if test -n "$PGCONFIG"; then
+ POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
+ POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
+ else
+ PKG_CHECK_MODULES(POSTGRESQL, libpq, [
+ POSTGRESQL_INC=$POSTGRESQL_CFLAGS
+ POSTGRESQL_LIB=$POSTGRESQL_LIBS
+ ],[
+ AC_MSG_ERROR([pg_config or 'pkg-config libpq' needed; set PGCONFIG if not in PATH])
+ ])
fi
- POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
- POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
FilterLibs "${POSTGRESQL_LIB}"
POSTGRESQL_LIB="${filteredlibs}"
else

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Mar 4 12:37:41 UTC 2019 - Reinhard Max <max@suse.com>
- libreoffice-postgresql.patch: pg_config is meant for linking
server extensions, clients should use pkg-config instead to build
against libpq. This fixes build with PostgreSQL 11.
-------------------------------------------------------------------
Mon Mar 4 10:00:18 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -102,6 +102,7 @@ Patch3: mediawiki-no-broken-help.diff
Patch4: 0001-Speed-up-languagepack-installation.patch
Patch5: old-boost.patch
Patch6: kde5-32bit-build-fix.patch
Patch7: libreoffice-postgresql.patch
# try to save space by using hardlinks
Patch990: install-with-hardlinks.diff
# save time by relying on rpm check rather than doing stupid find+grep
@ -971,6 +972,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7
%patch990 -p1
%patch991 -p1