summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-08-16 09:48:48 -0400
committerMichael Orlitzky <mjo@gentoo.org>2017-08-16 09:52:16 -0400
commita244d75fc8320b34929a09fd93140a8b00aa95ee (patch)
tree829d8c7029a76fac25e8195ab5136b1fb0b66d8f /dev-db/pgagent
parentapp-i18n/ibus-table: new upstream release (diff)
downloadgentoo-a244d75fc8320b34929a09fd93140a8b00aa95ee.tar.gz
gentoo-a244d75fc8320b34929a09fd93140a8b00aa95ee.tar.bz2
gentoo-a244d75fc8320b34929a09fd93140a8b00aa95ee.zip
dev-db/pgagent: new patch to fix building against postgres-10.x.
The pgAgent build system didn't support a two-digit version of postgres, so pgagent failed to build against (for example) dev-db/postgresql-10_beta3. This has been fixed upstream but not yet released, so this commit cherry-picks that upstream commit as a patch and adds it (in-place) to the latest pgagent-3.4.0-r2.ebuild. Gentoo-Bug: 625878 Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'dev-db/pgagent')
-rw-r--r--dev-db/pgagent/files/postgres-10-build-fix.patch52
-rw-r--r--dev-db/pgagent/pgagent-3.4.0-r2.ebuild2
2 files changed, 54 insertions, 0 deletions
diff --git a/dev-db/pgagent/files/postgres-10-build-fix.patch b/dev-db/pgagent/files/postgres-10-build-fix.patch
new file mode 100644
index 000000000000..e2ecb0aa60b7
--- /dev/null
+++ b/dev-db/pgagent/files/postgres-10-build-fix.patch
@@ -0,0 +1,52 @@
+From a7b82fb3d3bd3de3ce624d9e4b0da53cb9835c2d Mon Sep 17 00:00:00 2001
+From: Ashesh Vashi <ashesh.vashi@enterprisedb.com>
+Date: Mon, 31 Jul 2017 14:57:55 +0530
+Subject: [PATCH] Added support two digits version for PostgreSQL/EDB Postgres
+ Advanced Server >= 10
+
+---
+ CMakeLists.txt | 6 +++++-
+ cmake/FindPG.cmake | 6 +++---
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8214650..29755b4 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -176,7 +176,11 @@ MESSAGE(STATUS " Description : ${CPACK_PACKAGE_DESCRIPTION_SUMM
+ MESSAGE(STATUS " Version : ${VERSION}")
+ MESSAGE(STATUS " ")
+ MESSAGE(STATUS " PostgreSQL version string : ${PG_VERSION_STRING}")
+-MESSAGE(STATUS " PostgreSQL version parts : ${PG_MAJOR_VERSION}.${PG_MINOR_VERSION}.${PG_PATCH_VERSION}")
++IF(${PG_MAJOR_VERSION} GREATER 9)
++ MESSAGE(STATUS " PostgreSQL version parts : ${PG_MAJOR_VERSION}")
++ELSE()
++ MESSAGE(STATUS " PostgreSQL version parts : ${PG_MAJOR_VERSION}.${PG_MINOR_VERSION}")
++ENDIF(${PG_MAJOR_VERSION} GREATER 10)
+ MESSAGE(STATUS " PostgreSQL path : ${PG_ROOT_DIR}")
+ MESSAGE(STATUS " PostgreSQL config binary : ${PG_CONFIG_PATH}")
+ MESSAGE(STATUS " PostgreSQL include path : ${PG_INCLUDE_DIRS}")
+diff --git a/cmake/FindPG.cmake b/cmake/FindPG.cmake
+index 349086c..9768771 100644
+--- a/cmake/FindPG.cmake
++++ b/cmake/FindPG.cmake
+@@ -28,7 +28,6 @@
+ # PG_VERSION_STRING - The PostgreSQL version number.
+ # PG_MAJOR_VERSION - The PostgreSQL major version (x in x.y.z).
+ # PG_MINOR_VERSION - The PostgreSQL minor version (y in x.y.z).
+-# PG_PATCH_VERSION - The PostgreSQL patch version (z in x.y.z).
+ # PG_EXTENSION - Set to TRUE if PostgreSQL supports extensions.
+
+ IF(NOT PG_STATIC OR PG_STATIC STREQUAL "")
+@@ -70,8 +69,9 @@ IF(NOT _retval)
+ # Split the version into its component parts.
+ STRING(REGEX MATCHALL "[0-9]+" PG_VERSION_PARTS "${PG_VERSION_STRING}")
+ LIST(GET PG_VERSION_PARTS 0 PG_MAJOR_VERSION)
+- LIST(GET PG_VERSION_PARTS 1 PG_MINOR_VERSION)
+- LIST(GET PG_VERSION_PARTS 2 PG_PATCH_VERSION)
++ IF((PG_MAJOR_VERSION LESS 10))
++ LIST(GET PG_VERSION_PARTS 1 PG_MINOR_VERSION)
++ ENDIF((PG_MAJOR_VERSION LESS 10))
+
+ # Are extensions supported?
+ IF((PG_MAJOR_VERSION GREATER 9) OR ((PG_MAJOR_VERSION EQUAL 9) AND (PG_MINOR_VERSION GREATER 0)))
diff --git a/dev-db/pgagent/pgagent-3.4.0-r2.ebuild b/dev-db/pgagent/pgagent-3.4.0-r2.ebuild
index 9f44b6fff0f9..e71c4b87d440 100644
--- a/dev-db/pgagent/pgagent-3.4.0-r2.ebuild
+++ b/dev-db/pgagent/pgagent-3.4.0-r2.ebuild
@@ -24,6 +24,8 @@ DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_PN}-${PV}-Source"
+PATCHES=( "${FILESDIR}/postgres-10-build-fix.patch" )
+
src_prepare() {
default
sed -e "s:share):share/${P}):" \