mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
python3: pin host curses to the SDK's narrow ncurses
Removing the ncursesw path from include avoids seeing the wide-char
version of ncurses, so the host build picks up the narrow static lib
that the OpenWrt SDK stages. To keep that pin from leaking back in
through other curses headers the build host may have under
/usr/include, also force every header check in Python's configure.ac
AC_CHECK_HEADERS(curses.h ncurses.h ncursesw/ncurses.h
ncursesw/curses.h ncursesw/panel.h panel.h) line to "no" via cached
ac_cv_header_* variables.
The narrow ncursesw_* trio was enough on the original reporter's
host; Jan Kardell's review of the first cut hit a build where
`/usr/include/curses.h` and `/usr/include/ncurses.h` from the
distro's libncurses-dev were still being picked up. Adding the
non-wide entries (and panel.h for symmetry, in case a host also
ships /usr/include/panel.h alone) makes the override insensitive to
whichever curses dev packages the host distro happens to provide.
Reported-by: Jan Kardell <jan.kardell@telliq.com>
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
(cherry picked from commit d883c02a41)
This commit is contained in:
committed by
Alexandru Ardelean
parent
32ac4e7db5
commit
aef786a263
@@ -41,7 +41,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
|
|||||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=bluez python3/host python-build/host python-installer/host python-wheel/host
|
PKG_BUILD_DEPENDS:=bluez python3/host python-build/host python-installer/host python-wheel/host
|
||||||
HOST_BUILD_DEPENDS:=bzip2/host libffi/host
|
HOST_BUILD_DEPENDS:=bzip2/host libffi/host ncurses/host
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/host-build.mk
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
@@ -293,10 +293,17 @@ endif
|
|||||||
# HOST_MAKE_VARS += \
|
# HOST_MAKE_VARS += \
|
||||||
# PYTHONSTRICTEXTENSIONBUILD=1
|
# PYTHONSTRICTEXTENSIONBUILD=1
|
||||||
|
|
||||||
# Bypass configure test
|
# Bypass configure test. Force every curses header check Python's
|
||||||
|
# configure.ac runs to "no" so the host distro's headers stay out.
|
||||||
HOST_CONFIGURE_VARS += \
|
HOST_CONFIGURE_VARS += \
|
||||||
py_cv_module__tkinter=n/a \
|
py_cv_module__tkinter=n/a \
|
||||||
ac_cv_working_openssl_hashlib=yes
|
ac_cv_working_openssl_hashlib=yes \
|
||||||
|
ac_cv_header_curses_h=no \
|
||||||
|
ac_cv_header_ncurses_h=no \
|
||||||
|
ac_cv_header_panel_h=no \
|
||||||
|
ac_cv_header_ncursesw_curses_h=no \
|
||||||
|
ac_cv_header_ncursesw_ncurses_h=no \
|
||||||
|
ac_cv_header_ncursesw_panel_h=no
|
||||||
|
|
||||||
ifeq ($(HOST_OS),Darwin)
|
ifeq ($(HOST_OS),Darwin)
|
||||||
HOST_CONFIGURE_VARS += \
|
HOST_CONFIGURE_VARS += \
|
||||||
@@ -314,9 +321,8 @@ HOST_CONFIGURE_ARGS += \
|
|||||||
--with-system-expat \
|
--with-system-expat \
|
||||||
--without-cxx-main
|
--without-cxx-main
|
||||||
|
|
||||||
# ncurses and uuid have seemingly unsolvable issues with pkgconfig
|
# uuid has seemingly unsolvable issues with pkgconfig
|
||||||
HOST_CFLAGS += \
|
HOST_CFLAGS += \
|
||||||
-I$(STAGING_DIR_HOSTPKG)/include/ncursesw \
|
|
||||||
-I$(STAGING_DIR_HOST)/include/uuid
|
-I$(STAGING_DIR_HOST)/include/uuid
|
||||||
|
|
||||||
define Host/Configure
|
define Host/Configure
|
||||||
|
|||||||
Reference in New Issue
Block a user