mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 15:35:06 +00:00
Ports: Regenerate patches for python3
This commit is contained in:
parent
bbd4343b31
commit
fc02370dc7
7 changed files with 175 additions and 82 deletions
50
Ports/python3/patches/0004-Tweak-setup.py.patch
Normal file
50
Ports/python3/patches/0004-Tweak-setup.py.patch
Normal file
|
@ -0,0 +1,50 @@
|
|||
From 2654555e3b0f4ddce9da96eafebd74449892e713 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Groh <mail@linusgroh.de>
|
||||
Date: Fri, 14 Jan 2022 23:36:52 +0330
|
||||
Subject: [PATCH 4/4] Tweak `setup.py`
|
||||
|
||||
Make some tweaks to Python's `setup.py`:
|
||||
|
||||
- Add `/usr/local/lib` and `/usr/local/include` to the system lib and
|
||||
include dirs respectively, relative to the sysroot when
|
||||
crosscompiling. These are by default only included when not
|
||||
crosscompiling for some reason.
|
||||
- Add `/usr/local/include/ncurses` to the curses include paths so it can
|
||||
build the `_curses` module. This is by default included for a bunch of
|
||||
extensions, but not `_curses`.
|
||||
---
|
||||
setup.py | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 43e807f..454be9e 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -846,8 +846,8 @@ class PyBuildExt(build_ext):
|
||||
add_dir_to_list(self.compiler.include_dirs,
|
||||
sysconfig.get_config_var("INCLUDEDIR"))
|
||||
|
||||
- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
|
||||
- system_include_dirs = ['/usr/include']
|
||||
+ system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib', '/usr/local/lib']
|
||||
+ system_include_dirs = ['/usr/include', '/usr/local/include']
|
||||
# lib_dirs and inc_dirs are used to search for files;
|
||||
# if a file is found in one of those directories, it can
|
||||
# be assumed that no additional -I,-L directives are needed.
|
||||
@@ -1158,7 +1158,12 @@ class PyBuildExt(build_ext):
|
||||
# Curses support, requiring the System V version of curses, often
|
||||
# provided by the ncurses library.
|
||||
curses_defines = []
|
||||
- curses_includes = []
|
||||
+ if not CROSS_COMPILING:
|
||||
+ curses_includes = ['/usr/local/include/ncurses']
|
||||
+ else:
|
||||
+ curses_includes = sysroot_paths(
|
||||
+ ('CPPFLAGS', 'CFLAGS', 'CC'), ['/usr/local/include/ncurses']
|
||||
+ )
|
||||
panel_library = 'panel'
|
||||
if curses_library == 'ncursesw':
|
||||
curses_defines.append(('HAVE_NCURSESW', '1'))
|
||||
--
|
||||
2.34.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue