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-24 09:33:15 +0300
commit354bb40e75d94466e91fe6960523612c9d17ccfb (patch)
treebdf8b8b90191b98e4b32b62e6cb0e947ea5d5ae2 /build
parent4bce3c574df293415c7b2f45b9c2951262fe3412 (diff)
Add implementation
Diffstat (limited to 'build')
-rw-r--r--build/.gitignore1
-rw-r--r--build/bootstrap.build40
-rw-r--r--build/export.build10
-rw-r--r--build/root.build24
4 files changed, 75 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..d8cff23
--- /dev/null
+++ b/build/bootstrap.build
@@ -0,0 +1,40 @@
+# 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, so we
+# obtain the ABI version from the SHARED_LIB_MAJOR_VERSION variable value in
+# cmake/mysql_version.cmake for each package release. Also, while at it, check
+# that the protocol version is still correct (the PROTOCOL_VERSION variable).
+#
+# See also how Debian/Fedora package libmariadb if trying to wrap your head
+# around this mess.
+#
+if ($version.major == 5 && $version.minor == 7 && $version.patch == 20)
+{
+ # @@ Should we also use the ABI minor version to make sure the library is
+ # also forward-compatible?
+ #
+ abi_version = 20
+
+ protocol_version = 10
+}
+else
+ fail "increment the ABI version?"
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..b699441
--- /dev/null
+++ b/build/root.build
@@ -0,0 +1,24 @@
+# file : build/root.build
+# copyright : Copyright (c) 2016-2017 Code Synthesis Ltd
+# license : GPLv2 with FOSS License Exception; see accompanying COPYING file
+
+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 to the strtoull() C function that was introduced
+# in C++11. Specifying C++11 looks like an overkill, and can break something
+# else.
+#
+using cxx.guess
+
+cxx.std = ($cxx.id == 'gcc' || $cxx.id == 'clang' ? gnu++03 : 03)
+
+using cxx
+
+hxx{*}: extension = hpp
+cxx{*}: extension = cpp