From a29fb305dff1500014304ae03d0c3d99f821b719c85a0eb0e62497ed7934b3a5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 21 Mar 2019 15:01:53 +0000 Subject: [PATCH] - Remove configure.ac.patch (was only applied for 1110 anyway) - Add 0001-build-adjust-configure-for-postgresql-10-11.patch OBS-URL: https://build.opensuse.org/package/show/server:database/libdbi-drivers?expand=0&rev=23 --- ...djust-configure-for-postgresql-10-11.patch | 120 ++++++++++++++++++ _service | 6 +- configure.ac.patch | 11 -- libdbi-drivers.changes | 6 + libdbi-drivers.spec | 14 +- 5 files changed, 132 insertions(+), 25 deletions(-) create mode 100644 0001-build-adjust-configure-for-postgresql-10-11.patch delete mode 100644 configure.ac.patch diff --git a/0001-build-adjust-configure-for-postgresql-10-11.patch b/0001-build-adjust-configure-for-postgresql-10-11.patch new file mode 100644 index 0000000..702e515 --- /dev/null +++ b/0001-build-adjust-configure-for-postgresql-10-11.patch @@ -0,0 +1,120 @@ +From 7a8e24ec1cf763226f4be31ba1018d888d4989f3 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Thu, 21 Mar 2019 14:21:27 +0100 +Subject: [PATCH] build: adjust configure for postgresql 10/11 + +The openSUSE PostgreSQL 11 no longer ships the pg_config program. +Instead, there exists a .pc file (likewise in pg10), so make use of +that, by default. + +The old --with-pgsql-inc and --with-pgsql-lib option are going away +and replaced by the standardized mechanisms pkg-config.m4 has in +store for when there is no .pc file or an unusual location: + + ./configure --with-pgsql pgsql_CFLAGS="-I/opt/pgsql/include" \ + pgsql_LIBS="-L/opt/pgsql/lib -lpq" +--- + acinclude.m4 | 66 ++++++--------------------------------- + drivers/pgsql/Makefile.am | 4 +-- + 2 files changed, 12 insertions(+), 58 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 85eec28..e99318f 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -154,64 +154,18 @@ AC_SUBST(MYSQL_TEST) + + AC_DEFUN([AC_CHECK_PGSQL], + [ +-AM_CONDITIONAL(HAVE_PGSQL, false) +-ac_pgsql="no" +-ac_pgsql_incdir="no" +-ac_pgsql_libdir="no" + +-# exported variables +-PGSQL_LIBS="" +-PGSQL_LDFLAGS="" +-PGSQL_INCLUDE="" +-PGSQL_TEST="" ++AC_ARG_WITH([pgsql], [AS_HELP_STRING([--without-pgsql], [Build without pgsql output plugin [default=test]])], ++ [ac_pgsql="$withval"], [ac_pgsql=auto]) ++enable_pgsql=no ++AS_IF([test "$ac_pgsql" = "auto"], [ ++ PKG_CHECK_MODULES([pgsql], [libpq], [enable_pgsql=yes], [:]) ++], [test "$ac_pgsql" != "no"], [ ++ PKG_CHECK_MODULES([pgsql], [libpq], [enable_pgsql=yes]) ++]) + +-AC_MSG_CHECKING(for PostgreSQL support) +- +-AC_ARG_WITH(pgsql, +- [ --with-pgsql Include PostgreSQL support.], +- [ ac_pgsql="$withval" ]) +-AC_ARG_WITH(pgsql-incdir, +- [ --with-pgsql-incdir Specifies where the PostgreSQL include files are.], +- [ ac_pgsql_incdir="$withval" ]) +-AC_ARG_WITH(pgsql-libdir, +- [ --with-pgsql-libdir Specifies where the PostgreSQL libraries are.], +- [ ac_pgsql_libdir="$withval" ]) +- +-if test "$ac_pgsql" = "yes"; then +- AC_MSG_RESULT([yes]) +- if test "$ac_pgsql_incdir" = "no" || test "$ac_pgsql_libdir" = "no"; then +- AC_CHECK_PROG([PG_CONFIG], [pg_config], [yes], [no]) +- if test "$PG_CONFIG" = "no"; then +- AC_MSG_ERROR([cannot auto-configure PostgreSQL without pg_config]) +- fi +- fi +- if test "$ac_pgsql_incdir" = "no"; then +- PGSQL_INCLUDE="-I"`pg_config --includedir` +- else +- PGSQL_INCLUDE=-I$ac_pgsql_incdir +- fi +- if test "$ac_pgsql_libdir" = "no"; then +- PGSQL_LDFLAGS=`pg_config --libdir` +- else +- PGSQL_LDFLAGS=-L$ac_pgsql_libdir +- fi +- +- PGSQL_LIBS=-lpq +- PGSQL_TEST="test_pgsql.sh" +- +- +- AM_CONDITIONAL(HAVE_PGSQL, true) +- +- AC_SUBST(PGSQL_LIBS) +- AC_SUBST(PGSQL_INCLUDE) +- AC_MSG_CHECKING(for PostgreSQL includes) +- AC_MSG_RESULT($PGSQL_INCLUDE) +- AC_SUBST(PGSQL_LDFLAGS) +- AC_MSG_CHECKING(for PostgreSQL libraries) +- AC_MSG_RESULT($PGSQL_LDFLAGS) +-else +- AC_MSG_RESULT(no) +-fi ++AM_CONDITIONAL([HAVE_PGSQL], [test "$enable_pgsql" = yes]) ++AS_IF([test "$enable_pgsql" = yes], [PGSQL_TEST="test_pgsql.sh"]) + AC_SUBST(PGSQL_TEST) + ]) + +diff --git a/drivers/pgsql/Makefile.am b/drivers/pgsql/Makefile.am +index 058a9b5..f482eac 100644 +--- a/drivers/pgsql/Makefile.am ++++ b/drivers/pgsql/Makefile.am +@@ -28,11 +28,11 @@ pgsql_sources = + + endif + +-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include @DBI_INCLUDE@ @PGSQL_INCLUDE@ ++AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include @DBI_INCLUDE@ ${pgsql_CFLAGS} + + driver_LTLIBRARIES = $(pgsql_ltlibs) + libdbdpgsql_la_LDFLAGS = $(pgsql_ldflags) +-libdbdpgsql_la_LIBADD = @PGSQL_LDFLAGS@ @PGSQL_LIBS@ @LIBADD_LIBDBI@ ++libdbdpgsql_la_LIBADD = ${pgsql_LIBS} @LIBADD_LIBDBI@ + libdbdpgsql_la_SOURCES = $(pgsql_sources) + libdbdpgsql_la_DEPENDENCIES = dbd_pgsql.h + +-- +2.21.0 + diff --git a/_service b/_service index 0950445..6531572 100644 --- a/_service +++ b/_service @@ -1,14 +1,14 @@ - + git git://git.code.sf.net/p/libdbi-drivers/libdbi-drivers master libdbi-drivers-0.9.0 0.9.0.g@TAG_OFFSET@ - + *.tar xz - + diff --git a/configure.ac.patch b/configure.ac.patch deleted file mode 100644 index d5682f1..0000000 --- a/configure.ac.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libdbi-drivers/configure.ac.orig 2016-02-04 10:12:56.049468401 +0100 -+++ libdbi-drivers/configure.ac 2016-02-04 10:13:10.336666283 +0100 -@@ -3,7 +3,7 @@ - AC_CONFIG_SRCDIR([drivers/sqlite/dbd_sqlite.c]) - AM_MAINTAINER_MODE - --AM_INIT_AUTOMAKE([foreign dist-zip subdir-objects serial-tests]) -+AM_INIT_AUTOMAKE([foreign dist-zip subdir-objects]) - AM_CONFIG_HEADER(config.h) - AC_LIBTOOL_WIN32_DLL - AC_CONFIG_MACRO_DIR([m4]) diff --git a/libdbi-drivers.changes b/libdbi-drivers.changes index 97f400b..56aa6ef 100644 --- a/libdbi-drivers.changes +++ b/libdbi-drivers.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 21 13:22:03 UTC 2019 - Jan Engelhardt + +- Remove configure.ac.patch (was only applied for 1110 anyway) +- Add 0001-build-adjust-configure-for-postgresql-10-11.patch + ------------------------------------------------------------------- Mon Mar 19 11:05:34 UTC 2018 - mpluskal@suse.com diff --git a/libdbi-drivers.spec b/libdbi-drivers.spec index 8e1781f..9b6e090 100644 --- a/libdbi-drivers.spec +++ b/libdbi-drivers.spec @@ -31,8 +31,7 @@ URL: http://libdbi-drivers.sf.net/ #Source: http://downloads.sf.net/libdbi-drivers/%name-%version.tar.gz Source: %name-%version.tar.xz -Patch1: configure.ac.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Patch1: 0001-build-adjust-configure-for-postgresql-10-11.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext @@ -103,10 +102,7 @@ libdbi database independent abstraction layer. Switching a program's driver does not require recompilation or rewriting source code. %prep -%setup -q -%if 0%{?suse_version} == 1110 -%patch -P 1 -p1 -%endif +%autosetup -p1 chmod a-x COPYING # Fake the __DATE__ so we do not needelessly rebuild @@ -132,7 +128,7 @@ export CFLAGS="%optflags -O0 -ggdb3" make %{?_smp_mflags} %install -make install DESTDIR="%buildroot" +%make_install find "%buildroot" -type f -name "*.la" -delete %check @@ -140,26 +136,22 @@ make check || : %if %build_freetds %files dbd-freetds -%defattr(-,root,root) %doc COPYING %dir %_libdir/dbd %_libdir/dbd/libdbdfreetds.so %endif %files dbd-mysql -%defattr(-,root,root) %doc COPYING %dir %_libdir/dbd %_libdir/dbd/libdbdmysql.so %files dbd-pgsql -%defattr(-,root,root) %doc COPYING %dir %_libdir/dbd %_libdir/dbd/libdbdpgsql.so %files dbd-sqlite3 -%defattr(-,root,root) %doc COPYING %dir %_libdir/dbd %_libdir/dbd/libdbdsqlite3.so