From 14e86457fd7bf7b4e3509a6234ef30156495430b Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 24 Jan 2018 04:27:51 -0500 Subject: [PATCH] Add patch to link with libdl. --- 0001-Add-libdl-on-Unix-like-systems.patch | 29 +++++++++++++++++++++++ python-matplotlib.spec | 9 +++++++ 2 files changed, 38 insertions(+) create mode 100644 0001-Add-libdl-on-Unix-like-systems.patch diff --git a/0001-Add-libdl-on-Unix-like-systems.patch b/0001-Add-libdl-on-Unix-like-systems.patch new file mode 100644 index 0000000..5cbbeca --- /dev/null +++ b/0001-Add-libdl-on-Unix-like-systems.patch @@ -0,0 +1,29 @@ +From 77bae7e7ea5c02f5be0d59dabeae6c3c09571fbe Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +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 +--- + 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 + diff --git a/python-matplotlib.spec b/python-matplotlib.spec index e0b55a5..e2a5481 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -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.