Fix FTBFS due to broken rpath

This commit is contained in:
Elliott Sales de Andrade 2022-05-23 02:48:53 -04:00
commit 85fdfde1c8
4 changed files with 93 additions and 3 deletions

View file

@ -1,7 +1,7 @@
From 315041aebb9d635d75349d020752b847a77396db Mon Sep 17 00:00:00 2001
From cd8908e8bab3827e6f8bb8e5d9b25bbd9db0aa18 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 26 Feb 2018 02:42:50 -0500
Subject: [PATCH] Increase tolerance for new FreeType.
Subject: [PATCH 1/3] Increase tolerance for new FreeType.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
@ -112,5 +112,5 @@ index 2eb6c470..46570324 100644
fig = plt.figure(figsize=(10, 10))
projections = (ccrs.PlateCarree(),
--
2.31.1
2.35.1

View file

@ -0,0 +1,32 @@
From a8cbc0491cae37c166a09b44a8e664b60dd55a39 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 21 May 2022 01:36:44 -0400
Subject: [PATCH 2/3] Use pkg-config to find GEOS instead of geos-config
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
setup.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/setup.py b/setup.py
index 6517b5e4..2bd3b5f3 100644
--- a/setup.py
+++ b/setup.py
@@ -108,11 +108,11 @@ def find_package_tree(root_path, root_package):
# GEOS
try:
- geos_version = subprocess.check_output(['geos-config', '--version'])
+ geos_version = subprocess.check_output(['pkg-config', '--modversion', 'geos'])
geos_version = tuple(int(v) for v in geos_version.split(b'.')
if 'dev' not in str(v))
- geos_includes = subprocess.check_output(['geos-config', '--includes'])
- geos_clibs = subprocess.check_output(['geos-config', '--clibs'])
+ geos_includes = subprocess.check_output(['pkg-config', '--cflags', 'geos'])
+ geos_clibs = subprocess.check_output(['pkg-config', '--libs', 'geos'])
except (OSError, ValueError, subprocess.CalledProcessError):
warnings.warn(
'Unable to determine GEOS version. Ensure you have %s or later '
--
2.35.1

View file

@ -0,0 +1,55 @@
From af70de7feda043e45d150aadb6cedbc67c925e47 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 23 May 2022 02:42:38 -0400
Subject: [PATCH 3/3] Remove extraneous insertion of default compiler paths
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
setup.py | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/setup.py b/setup.py
index 2bd3b5f3..92a70a68 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,6 @@ import shutil
import subprocess
import warnings
from collections import defaultdict
-from sysconfig import get_config_var
from setuptools import Command, Extension, convert_path, setup
@@ -250,16 +249,7 @@ install_requires = extras_require.pop('default')
tests_require = extras_require.get('tests', [])
# General extension paths
-if sys.platform.startswith('win'):
- def get_config_var(name):
- return '.'
-include_dir = get_config_var('INCLUDEDIR')
-library_dir = get_config_var('LIBDIR')
extra_extension_args = defaultdict(list)
-if not sys.platform.startswith('win'):
- extra_extension_args["runtime_library_dirs"].append(
- get_config_var('LIBDIR')
- )
# Description
# ===========
@@ -277,10 +267,10 @@ extensions = [
Extension(
'cartopy.trace',
['lib/cartopy/trace.pyx'],
- include_dirs=([include_dir, './lib/cartopy', np.get_include()] +
+ include_dirs=(['./lib/cartopy', np.get_include()] +
proj_includes + geos_includes),
libraries=proj_libraries + geos_libraries,
- library_dirs=[library_dir] + proj_library_dirs + geos_library_dirs,
+ library_dirs=proj_library_dirs + geos_library_dirs,
language='c++',
**extra_extension_args),
]
--
2.35.1

View file

@ -17,6 +17,9 @@ Source1: siteconfig.py
# Might not go upstream in current form.
Patch0001: 0001-Increase-tolerance-for-new-FreeType.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2088864
Patch0002: 0002-Use-pkg-config-to-find-GEOS-instead-of-geos-config.patch
Patch0003: 0003-Remove-extraneous-insertion-of-default-compiler-path.patch
BuildRequires: git-core
BuildRequires: gcc-c++