summaryrefslogtreecommitdiff
path: root/libpq/build
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-11-30 22:37:25 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-12-06 15:11:04 +0300
commitf1f39911e0d2d88c98eae96a3eb14a53c664206f (patch)
tree4cf4e3a84d895f59323d3b6ab4bfab38b3cab489 /libpq/build
parentfc9499b8a7b7a3e350bfabf2cd6ae0bc13f04bea (diff)
Upgrade to 12.1
Diffstat (limited to 'libpq/build')
-rw-r--r--libpq/build/.gitignore3
-rw-r--r--libpq/build/bootstrap.build40
-rw-r--r--libpq/build/export.build10
-rw-r--r--libpq/build/root.build19
4 files changed, 72 insertions, 0 deletions
diff --git a/libpq/build/.gitignore b/libpq/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/libpq/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/libpq/build/bootstrap.build b/libpq/build/bootstrap.build
new file mode 100644
index 0000000..22b180f
--- /dev/null
+++ b/libpq/build/bootstrap.build
@@ -0,0 +1,40 @@
+# file : build/bootstrap.build
+# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
+# license : PostgreSQL License; see accompanying COPYRIGHT file
+
+project = libpq
+
+using version
+using config
+using dist
+using test
+using install
+
+# PostgreSQL releases (for quite a long time) had the 3-component versions,
+# where the first 2 components denoted a major version and the third one --
+# the minor version. This has changed starting from version 10, with the major
+# version represented by a single component. Minor releases are guaranteed to
+# be backwards-compatible and contain only bug fixes. See also:
+#
+# https://www.postgresql.org/support/versioning/
+#
+# Note that the release version is not a semantic version and we will map it to
+# the standard version as <major>.<minor>.0.
+#
+# There is no document that describes libpq ABI versioning and compatibility
+# rules, so everything that follows is implied from
+# src/interfaces/libpq/Makefile.
+#
+# The library naming schema on Linux is libpq.so.<so_major>.<so_minor>
+# (SO_MAJOR_VERSION and SO_MINOR_VERSION in the Makefile) So presumably
+# so_major is incremented on backwards-incompatible ABI changes (it hasn't
+# been for the several last major version releases). And so_minor is equal to
+# the package major version.
+#
+if ($version.major == 12 && $version.minor == 1)
+{
+ abi_major = 5
+ abi_minor = 12
+}
+else
+ fail "increment the ABI version?"
diff --git a/libpq/build/export.build b/libpq/build/export.build
new file mode 100644
index 0000000..748c3ea
--- /dev/null
+++ b/libpq/build/export.build
@@ -0,0 +1,10 @@
+# file : build/export.build
+# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
+# license : PostgreSQL License; see accompanying COPYRIGHT file
+
+$out_root/
+{
+ include libpq/
+}
+
+export $out_root/libpq/lib{pq}
diff --git a/libpq/build/root.build b/libpq/build/root.build
new file mode 100644
index 0000000..76b1aa3
--- /dev/null
+++ b/libpq/build/root.build
@@ -0,0 +1,19 @@
+# file : build/root.build
+# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
+# license : PostgreSQL License; see accompanying COPYRIGHT file
+
+# We rely on this in macros/options deduction (see
+# libpq/{buildfile,pg_config.h} for details).
+#
+c.std = 99
+
+using c
+
+h{*}: extension = h
+c{*}: extension = c
+
+if ($c.target.system == 'win32-msvc')
+ c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($c.class == 'msvc')
+ c.coptions += /wd4251 /wd4275 /wd4800