diff --git a/libreoffice-postgresql.patch b/libreoffice-postgresql.patch new file mode 100644 index 0000000..742193e --- /dev/null +++ b/libreoffice-postgresql.patch @@ -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 diff --git a/libreoffice.changes b/libreoffice.changes index 2939ba8..90fb6d5 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 4 12:37:41 UTC 2019 - Reinhard Max + +- 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 diff --git a/libreoffice.spec b/libreoffice.spec index 0b8937b..d6b4784 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -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