Add patch to link with libdl.

This commit is contained in:
Elliott Sales de Andrade 2018-01-24 04:27:51 -05:00
parent 8d6885671d
commit 14e86457fd
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From 77bae7e7ea5c02f5be0d59dabeae6c3c09571fbe Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 24 Jan 2018 02:51:55 -0500
Subject: [PATCH] Add libdl on Unix-like systems.
Not linking with libdl causes errors when -z defs is in the linker
flags.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
setupext.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/setupext.py b/setupext.py
index d0f3f2070..6d2c3e296 100644
--- a/setupext.py
+++ b/setupext.py
@@ -1493,6 +1493,8 @@ class BackendTkAgg(OptionalBackendPackage):
if sys.platform == 'win32':
# PSAPI library needed for finding Tcl / Tk at run time
ext.libraries.extend(['psapi'])
+ elif sys.platform != 'darwin':
+ ext.libraries.extend(['dl'])
class BackendGtk(OptionalBackendPackage):
--
2.14.3

View File

@ -64,12 +64,18 @@ URL: http://matplotlib.org
Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}%{?rctag}/matplotlib-%{version}%{?rctag}.tar.gz
Source1: setup.cfg
# https://github.com/matplotlib/matplotlib/pull/10310
Patch0001: 0001-Add-libdl-on-Unix-like-systems.patch
# Fedora-specific patches.
# https://github.com/QuLogic/mpl-images
Source1000: matplotlib-%{version}-with-freetype-2.8.tar.gz
# https://github.com/QuLogic/matplotlib/tree/fedora-patches
Patch1001: 0001-matplotlibrc-path-search-fix.patch
Patch1002: 0002-Increase-tolerances-for-FreeType-2.7.1.patch
Patch1003: 0003-Increase-tolerances-for-FT-2.7.1-and-other-arches.patch
Patch1004: 0004-Increase-some-tolerances-for-32-bit-systems.patch
# https://github.com/QuLogic/matplotlib/tree/fedora-patches-non-x86
Patch1005: 0004-Increase-some-tolerances-for-non-x86-arches.patch
BuildRequires: freetype-devel
@ -383,6 +389,9 @@ Requires: python3-tkinter
%prep
%autosetup -n matplotlib-%{version}%{?rctag} -N
%patch0001 -p1
# Fedora-specific patches follow:
%patch1001 -p1
%if %{fedora} > 26
# Updated test images for FreeType 2.8.