summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmysqlclient/manifest2
-rw-r--r--libmysqlclient/mysql/buildfile101
2 files changed, 52 insertions, 51 deletions
diff --git a/libmysqlclient/manifest b/libmysqlclient/manifest
index 8e0e64f..9edf1d6 100644
--- a/libmysqlclient/manifest
+++ b/libmysqlclient/manifest
@@ -3,7 +3,7 @@ name: libmysqlclient
# Note: remember to update doc-url below!
#
-version: 8.0.15+4
+version: 8.0.15+5
project: mysql
summary: MySQL C API client library
diff --git a/libmysqlclient/mysql/buildfile b/libmysqlclient/mysql/buildfile
index 3aaa9f0..85af149 100644
--- a/libmysqlclient/mysql/buildfile
+++ b/libmysqlclient/mysql/buildfile
@@ -13,12 +13,6 @@ bsd = ($tclass == 'bsd')
macos = ($tclass == 'macos')
windows = ($tclass == 'windows')
-msvc_runtime = ($tsys == 'win32-msvc')
-
-gcc = ($c.class == 'gcc')
-msvc = ($c.class == 'msvc')
-clang_msvc = ($c.id == 'clang' && $msvc_runtime)
-
# Windows-specific utilities.
#
mysys_win32 = my_conio my_windac my_winerr my_winfile win_timers
@@ -73,7 +67,6 @@ lib{mysqlclient}: zlib/file{README} strings/file{README}
# Source package: /tmp/mysql.sock
#
h{version}: mysql/in{mysql_version} $src_root/manifest
-h{version}:
{
dist = true
clean = ($src_root != $out_root)
@@ -102,7 +95,6 @@ h{version}:
}
h{config}: in{config}
-h{config}:
{
MYSQL_VERSION_MAJOR = $version.major
MYSQL_VERSION_MINOR = $version.minor
@@ -146,20 +138,17 @@ cc.poptions += -DHAVE_CONFIG_H \
-D_USE_MATH_DEFINES \
-DDBUG_OFF
-if! $windows
+switch $tclass
{
- cc.poptions += -D_FILE_OFFSET_BITS=64
+ case 'windows'
+ cc.poptions += -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -DNOGDI \
+ -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_MBCS
- if $linux
- cc.poptions += -D_GNU_SOURCE
-}
-else
-{
- cc.poptions += -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -DNOGDI -DNOMINMAX \
- -DWIN32_LEAN_AND_MEAN -D_MBCS
+ case 'linux'
+ cc.poptions += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
- if $msvc
- cc.coptions += /GS /fp:precise /Zc:wchar_t /Zc:forScope
+ default
+ cc.poptions += -D_FILE_OFFSET_BITS=64
}
# Note that we add "-I$src_root" for the headers auto-generating machinery to
@@ -203,50 +192,62 @@ else
# Disable the 'POSIX name for this item is deprecated' warnings.
#
-if $clang_msvc
+if ($c.id == 'clang' && $tsys == 'win32-msvc')
cc.coptions += -Wno-deprecated-declarations
-if $msvc
+switch $c.class
{
- # Disable warnings that pop up with /W3.
- #
- cc.coptions += /wd4018 /wd4068 /wd4091 /wd4101 /wd4146 /wd4244 /wd4267 \
- /wd4477 /wd4700 /wd4805 /wd4996
-}
-elif $gcc
-{
- cc.coptions += -ffunction-sections -fdata-sections -fno-omit-frame-pointer
-
- # Disable warnings that pop up with -Wall -Wextra. Upstream doesn't seem to
- # care about these and it is not easy to disable specific warnings in a way
- # that works across compilers/version (some -Wno-* options are only
- # recognized in newer versions). There are still some warnings left that
- # appear for certain platforms/compilers. We pass them through but disable
- # treating them as errors.
- #
- cc.coptions += -Wno-all -Wno-extra -Wno-error
+ case 'gcc'
+ {
+ cc.coptions += -ffunction-sections -fdata-sections -fno-omit-frame-pointer
+
+ # Disable warnings that pop up with -Wall -Wextra. Upstream doesn't seem to
+ # care about these and it is not easy to disable specific warnings in a way
+ # that works across compilers/version (some -Wno-* options are only
+ # recognized in newer versions). There are still some warnings left that
+ # appear for certain platforms/compilers. We pass them through but disable
+ # treating them as errors.
+ #
+ cc.coptions += -Wno-all -Wno-extra -Wno-error
+ }
+ case 'msvc'
+ {
+ cc.coptions += /GS /fp:precise /Zc:wchar_t /Zc:forScope
+
+ # Disable warnings that pop up with /W3.
+ #
+ cc.coptions += /wd4018 /wd4068 /wd4091 /wd4101 /wd4146 /wd4244 /wd4267 \
+ /wd4477 /wd4700 /wd4805 /wd4996
+ }
}
-if! $windows
+switch $tclass, $tsys
{
- # On Linux the upstream package also passes the cmake-generated libmysql.ver
- # file. The symbols it contains are hard-coded into libmysql/CMakeList.txt.
- # We have dropped the file for now.
- #
- if $linux
+ case 'windows', 'mingw32'
+ cc.libs += -ladvapi32
+
+ case 'windows'
+ cc.libs += advapi32.lib
+
+ case 'linux'
{
+ # The upstream package also passes the cmake-generated libmysql.ver file.
+ # The symbols it contains are hard-coded into libmysql/CMakeList.txt. We
+ # have dropped the file for now.
+ #
# Make sure all symbols are resolvable.
#
- libs{mysqlclient}: cc.loptions += -Wl,--no-undefined
+ cc.loptions += -Wl,--no-undefined
+
+ cc.libs += -ldl -lpthread -lm -lrt
}
- cc.libs += ($bsd ? -lexecinfo : -ldl) -lpthread -lm
+ case 'bsd'
+ cc.libs += -lexecinfo -lpthread -lm
- if $linux
- cc.libs += -lrt # Posix timers.
+ default
+ cc.libs += -ldl -lpthread -lm
}
-else
- cc.libs += $regex.apply(advapi32, '(.+)', $msvc_runtime ? '\1.lib' : '-l\1')
# Export options.
#