ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ozone/mgar/pkg/py311/Makefile
Revision: 11
Committed: Sat Jun 20 21:40:57 2026 UTC (4 weeks, 2 days ago) by operz
File size: 1981 byte(s)
Log Message:
Add Python 3.11.15 recipe (OZSWpy311); update readline to link against ncurses (for Python curses module)

File Contents

# Content
1 # vim: ft=make ts=4 sw=4 noet
2 .DEFAULT_GOAL := all
3
4 NAME = py311
5 VERSION = 3.11.15
6 GARTYPE = v2
7
8 DISTNAME = Python-$(VERSION)
9 MASTER_SITES = https://www.python.org/ftp/python/$(VERSION)/
10 DISTFILES += $(DISTNAME).tgz
11
12 WORKSRC = $(WORKDIR)/Python-$(VERSION)
13
14 LICENSE = LICENSE
15
16 PACKAGES += OZSWpy311
17 SPKG_DESC_OZSWpy311 = Python 3.11 programming language interpreter
18 CATALOGNAME_OZSWpy311 = py311
19
20 BUILD_DEP_PKGS += OZSWopenssl OZSWzlib OZSWlibffi OZSWbzip2 OZSWxz OZSWsqlite OZSWreadline OZSWncurses
21 RUNTIME_DEP_PKGS_OZSWpy311 += OZSWopenssl OZSWzlib OZSWlibffi OZSWbzip2 OZSWxz OZSWsqlite OZSWreadline OZSWncurses
22
23 EXTENSIONS = 1
24
25 # ncurses wide-char headers live in a subdir
26 CPPFLAGS += -I$(prefix)/include/ncursesw
27
28 EXTRA_CONFIGURE_ARGS += --enable-shared
29 EXTRA_CONFIGURE_ARGS += --with-openssl=$(prefix)
30 EXTRA_CONFIGURE_ARGS += --with-openssl-rpath=auto
31 EXTRA_CONFIGURE_ARGS += --without-ensurepip
32 EXTRA_CONFIGURE_ARGS += --with-readline=readline
33 EXTRA_CONFIGURE_ARGS += --disable-test-modules
34 EXTRA_CONFIGURE_ARGS += ax_cv_c_float_words_bigendian=no
35
36 EXTRA_LD_FLAGS += -lsocket -lnsl
37
38 # Use GNU ar (system ar doesn't handle GCC-generated ELF objects correctly)
39 BUILD_OVERRIDE_VARS += AR
40 BUILD_OVERRIDE_VAR_AR = /opt/ozsw/bin/ar
41 INSTALL_OVERRIDE_VARS += AR
42 INSTALL_OVERRIDE_VAR_AR = /opt/ozsw/bin/ar
43
44 post-configure:
45 # hstrerror is not in any shared lib on this Solaris version
46 gsed -i 's/#define HAVE_HSTRERROR 1/\/* #define HAVE_HSTRERROR 1 *\//' \
47 $(WORKSRC)/pyconfig.h
48 # setup.py HAVE_NCURSESW block needs NCURSES_WIDECHAR=1 too, otherwise
49 # cchar_t is not declared (ncurses gates on _XOPEN_SOURCE_EXTENDED,
50 # not Solaris _XPG6). Use gsed s/// to append line after HAVE_NCURSESW.
51 gsed -i "s/curses_defines\.append(('HAVE_NCURSESW', '1'))/curses_defines.append(('HAVE_NCURSESW', '1'))\n curses_defines.append(('NCURSES_WIDECHAR', '1'))/" \
52 $(WORKSRC)/setup.py
53 @$(MAKECOOKIE)
54
55 include gar/category.mk