diff options
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/pymssql/files/pymssql-2.2.1-clock_gettime.patch | 27 | ||||
-rw-r--r-- | dev-python/pymssql/pymssql-2.2.1.ebuild | 8 |
2 files changed, 35 insertions, 0 deletions
diff --git a/dev-python/pymssql/files/pymssql-2.2.1-clock_gettime.patch b/dev-python/pymssql/files/pymssql-2.2.1-clock_gettime.patch new file mode 100644 index 000000000000..76d07e27db24 --- /dev/null +++ b/dev-python/pymssql/files/pymssql-2.2.1-clock_gettime.patch @@ -0,0 +1,27 @@ +From d130cacf5be53b4c15bb64787d82b1225b1485e7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 17 Apr 2021 13:10:34 +0200 +Subject: [PATCH] Check for clock_gettime() only when linking statically + +The extension module does not use clock_gettime() directly, so I presume +it is only necessary when linking statically to FreeTDS. +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 3ac434e..0295d01 100644 +--- a/setup.py ++++ b/setup.py +@@ -95,7 +95,7 @@ if not WINDOWS: + print("setup.py: include_dirs =>", include_dirs) + print("setup.py: library_dirs =>", library_dirs) + +-if not WINDOWS: ++if LINK_FREETDS_STATICALLY and not WINDOWS: + # check for clock_gettime, link with librt for glibc<2.17 + from dev import ccompiler + compiler = ccompiler.new_compiler() +-- +2.31.1 + diff --git a/dev-python/pymssql/pymssql-2.2.1.ebuild b/dev-python/pymssql/pymssql-2.2.1.ebuild index 274a43969692..c272cd2b2d62 100644 --- a/dev-python/pymssql/pymssql-2.2.1.ebuild +++ b/dev-python/pymssql/pymssql-2.2.1.ebuild @@ -27,4 +27,12 @@ BDEPEND=" dev-python/sqlalchemy[${PYTHON_USEDEP}] )" +PATCHES=( + "${FILESDIR}"/${P}-clock_gettime.patch +) + distutils_enable_tests pytest + +src_configure() { + export LINK_FREETDS_STATICALLY=no +} |