aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-11-02 23:11:29 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-11-21 13:51:37 +0300
commitb1471ebbe9db90c472ff356bea6a7c8aedb45db9 (patch)
treea3494b3c2ca9a3529588c4da6e52d9040722a404 /build
parent4bce3c574df293415c7b2f45b9c2951262fe3412 (diff)
Add implementation
Diffstat (limited to 'build')
-rw-r--r--build/.gitignore1
-rw-r--r--build/bootstrap.build53
-rw-r--r--build/export.build10
-rw-r--r--build/root.build26
4 files changed, 90 insertions, 0 deletions
diff --git a/build/.gitignore b/build/.gitignore
new file mode 100644
index 0000000..225c27f
--- /dev/null
+++ b/build/.gitignore
@@ -0,0 +1 @@
+config.build
diff --git a/build/bootstrap.build b/build/bootstrap.build
new file mode 100644
index 0000000..1137155
--- /dev/null
+++ b/build/bootstrap.build
@@ -0,0 +1,53 @@
+# file : build/bootstrap.build
+# copyright : Copyright (c) 2016-2017 Code Synthesis Ltd
+# license : GPLv2 with FOSS License Exception; see accompanying COPYING file
+
+project = libmysqlclient
+
+using version
+using config
+using dist
+using test
+using install
+
+# The MySQL client library ABI version number has the <major>.<minor>.<patch>
+# form. The major number is increased for backwards-incompatible API changes,
+# the minor number for backwards-compatible ones (for example, for adding a new
+# function), and the patch number is typically increased for each package
+# release, being in a sense redundant. Increase of the version component resets
+# the rightmost ones to zero. See also:
+#
+# http://mysqlserverteam.com/the-client-library-part-2-the-version-number/
+#
+# There is no way to deduce the ABI version from the release version. Moreover
+# the MySQL release history demonstrates their lack of correlation:
+#
+# release ABI
+# ...
+# 5.6.37 18.1.0
+# 5.7.1 18.0.0 (presumably a bug)
+# 5.7.2 18.1.0
+# ...
+# 5.7.5 18.3.0
+# 5.7.6 20.0.0
+# ...
+#
+# So we will have to obtain the ABI version from SHARED_LIB_*_VERSION variable
+# values in cmake/mysql_version.cmake for each package release. Also check that
+# the protocol version still correct (PROTOCOL_VERSION varible),
+#
+if ($version.major == 5 && $version.minor == 7 && $version.patch == 20)
+{
+ abi_major = 20
+ abi_minor = 3
+
+ protocol_version = 10
+}
+else
+ fail "increment the ABI version?"
+
+# To make sure the library is fully (backward and forward) compatible with
+# programs it is linked to, we will use the original ABI major and minor
+# numbers, dropping the redundant patch number,
+#
+abi_version = $abi_major.$abi_minor
diff --git a/build/export.build b/build/export.build
new file mode 100644
index 0000000..786efb8
--- /dev/null
+++ b/build/export.build
@@ -0,0 +1,10 @@
+# file : build/export.build
+# copyright : Copyright (c) 2016-2017 Code Synthesis Ltd
+# license : GPLv2 with FOSS License Exception; see accompanying COPYING file
+
+$out_root/:
+{
+ include mysql/
+}
+
+export $out_root/mysql/lib{mysqlclient}
diff --git a/build/root.build b/build/root.build
new file mode 100644
index 0000000..106f042
--- /dev/null
+++ b/build/root.build
@@ -0,0 +1,26 @@
+# file : build/root.build
+# copyright : Copyright (c) 2016-2017 Code Synthesis Ltd
+# license : GPLv2 with FOSS License Exception; see accompanying COPYING file
+
+# C++ style comments are used in the C code, so we specify the lowest possible
+# standard.
+#
+c.std = 99
+
+using c
+
+h{*}: extension = h
+c{*}: extension = c
+
+# The upstream package uses -std=gnu++03 on Linux. However we can't specify
+# C++03 as the code refers strtoull() C function, that was introduced in C++11.
+# Specifying C++11 looks like an overkill, and can break something else. Let's
+# not specify the standard at all, as the upstream package does for OSes other
+# than Lunux.
+#
+#cxx.std = 03
+
+using cxx
+
+hxx{*}: extension = hpp
+cxx{*}: extension = cpp